Skip to content

Commit

Permalink
add args NODE_ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
Suryansh5545 committed Aug 5, 2023
1 parent 2dbae6b commit 54674ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docker-compose-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ services:
dockerfile: docker/prod/nodejs_v1/Dockerfile
environment:
ANGULAR_ENV: staging
args:
NODE_ENV: staging
ports:
- "4200:4200"
- "3000:3000"
Expand Down
4 changes: 2 additions & 2 deletions docker/prod/nodejs_v1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.16.0 as builder
FROM node:18.16.0

ARG NODE_ENV
RUN npm install -g @angular/[email protected]
Expand All @@ -18,4 +18,4 @@ RUN ng build --configuration=${NODE_ENV}
FROM nginx:1.25.1-alpine
ARG NODE_ENV
COPY docker/prod/nodejs_v1/nginx_${NODE_ENV}.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /code/dist /usr/share/nginx/html
COPY --from=node /code/dist /usr/share/nginx/html

0 comments on commit 54674ec

Please sign in to comment.