Configured frontend during image build
This commit is contained in:
@ -4,7 +4,7 @@ WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
RUN VITE_API_URL="http://localhost:5000" npm run build
|
||||
|
||||
# Etap 2: Nginx
|
||||
FROM nginx:alpine
|
||||
|
@ -1,7 +1,7 @@
|
||||
import axios from "axios";
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
const API_URL = "http://localhost:5000";
|
||||
const API_URL = import.meta.env.VITE_API_URL;
|
||||
|
||||
const api = axios.create({
|
||||
baseURL: API_URL,
|
||||
|
Reference in New Issue
Block a user