Created
December 17, 2021 10:40
-
-
Save Pythonista7/5ed8b7358dd305286660fc3e89e17477 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Common build stage | |
FROM node:14.14.0-alpine3.12 as common-build-stage | |
COPY . ./app | |
WORKDIR /app | |
RUN npm install | |
EXPOSE 3000 | |
# Development build stage | |
FROM common-build-stage as development-build-stage | |
ENV NODE_ENV development | |
CMD ["npm", "run", "dev"] | |
# Production build stage | |
FROM common-build-stage as production-build-stage | |
ENV NODE_ENV production | |
CMD ["npm", "run", "start"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment