diff --git a/nest2dvue/Dockerfile b/nest2dvue/Dockerfile index f677477..1f243a5 100644 --- a/nest2dvue/Dockerfile +++ b/nest2dvue/Dockerfile @@ -5,6 +5,11 @@ WORKDIR /app COPY package*.json ./ RUN npm install COPY . . + +# Pass build-time variables +ARG VITE_API_URL +ENV VITE_API_URL=${VITE_API_URL} + RUN npm run build # production stage diff --git a/nest2dvue/src/constants.js b/nest2dvue/src/constants.js index b09cb8b..8336a46 100644 --- a/nest2dvue/src/constants.js +++ b/nest2dvue/src/constants.js @@ -1,3 +1,5 @@ // src/utils/constants.js export const API_URL = import.meta.env.VITE_API_URL; +console.log('API_URL:', API_URL); // Debugging purpose +