Skip to content

Commit

Permalink
refactor Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sssomeshhh committed May 28, 2024
1 parent 5032c2a commit 44c12ad
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM node:current-bullseye-slim as fe
RUN corepack enable
WORKDIR /root/fe
COPY ./fe .
COPY ./fe/package.json .
COPY ./fe/yarn.lock .
RUN yarn install
COPY ./fe .
RUN yarn produce

FROM mongo:latest as fs
Expand All @@ -14,9 +16,12 @@ RUN apt-get update && \
corepack enable
COPY --from=sssomeshhh/rentify:fe /root/fe/build /root/fe/build
WORKDIR /root/be
COPY ./be .
COPY ./be/package.json .
COPY ./be/yarn.lock .
RUN yarn install
COPY ./be .
ENV SERVER_PORT=80
EXPOSE 80
ENV IS_EVAL=true
RUN echo "mongod > /dev/null 2>&1 & disown ; yarn produce ;" > startApp
CMD bash ./startApp

0 comments on commit 44c12ad

Please sign in to comment.