-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerize multi stage #35
base: master
Are you sure you want to change the base?
Conversation
👷 Deploy request for chronofactorem pending review.Visit the deploys page to approve it
|
# Deploy stage | ||
FROM node:17-bullseye-slim | ||
WORKDIR /usr/src/app | ||
|
||
COPY --chown=node:node . . | ||
RUN rm -rf client | ||
RUN mkdir -p client/build | ||
COPY --from=chrono-build-stage --chown=node:node /usr/src/app/build /usr/src/app/client/build | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends dumb-init && apt-get clean && rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think explicitly setting NODE_ENV
again in the deploy stage would be a good idea. Everything else looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do this, and I'll be optimizing it a little more (docker cache works really well with pnpm)
Make the docker build multi-stage
I'm new to this, so I need a review to see if this is the right way to do it.