Skip to content

Commit

Permalink
fix compose for staging
Browse files Browse the repository at this point in the history
  • Loading branch information
Suryansh5545 committed Aug 5, 2023
1 parent 285ebc2 commit 6e13ef3
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions docker/prod/nodejs_v1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
FROM node:18.16.0
FROM node:18.16.0 as builder

ARG NODE_ENV
RUN npm install -g @angular/[email protected]
RUN mkdir /code

WORKDIR /code
# Copy codebase
COPY ./ /code/

WORKDIR /code
COPY frontend/package.json frontend/yarn.lock /code/
RUN npm update

ADD frontend/package.json frontend/yarn.lock /code/
RUN yarn install
ENV PATH="/code/node_modules/.bin:$PATH"
ENV PATH="/code/node_modules/.bin:$PATH"
COPY frontend/ /code
RUN ng build --prod --configuration=${NODE_ENV}
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=node /code/dist /usr/share/nginx/html
COPY --from=builder /code/dist /usr/share/nginx/html

0 comments on commit 6e13ef3

Please sign in to comment.