Skip to content

Commit

Permalink
try fix api_url
Browse files Browse the repository at this point in the history
  • Loading branch information
VovaStelmashchuk committed Aug 8, 2024
1 parent ffc04e8 commit 44f564c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nest2dvue/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions nest2dvue/src/constants.js
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 44f564c

Please sign in to comment.