Skip to content

Commit

Permalink
chore: .env file in webapp
Browse files Browse the repository at this point in the history
Co-authored-by: Gonzalo Suárez Losada <[email protected]>
  • Loading branch information
Toto-hitori committed Mar 11, 2024
1 parent 616c6d2 commit 7cc1579
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ services:
container_name: webapp-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_en2b/webapp:latest
profiles: [ "dev", "prod" ]

build:
args:
REACT_APP_API_ENDPOINT: ${API_URI}
context: ./webapp
environment:
- REACT_APP_API_ENDPOINT=${API_URI}
Expand Down
2 changes: 2 additions & 0 deletions webapp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ RUN npm install
#Create an optimized version of the webapp
RUN npm run build
RUN npm install serve
ARG REACT_APP_API_ENDPOINT
RUN echo "REACT_APP_API_ENDPOINT=$REACT_APP_API_ENDPOINT" > .env

#Execute npm run prod to run the server
CMD [ "npm", "run", "prod" ]
Expand Down

0 comments on commit 7cc1579

Please sign in to comment.