Created
July 24, 2022 16:21
-
-
Save robsoncezario/fb8c1197692d54e11eee3289e73dda13 to your computer and use it in GitHub Desktop.
A docker file for nest js
This file contains 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
FROM node:16-alpine AS base | |
WORKDIR /app | |
COPY [ "package*.json", "tsconfig.build.json", "tsconfig.json", ".eslintrc.js", ".prettierrc", "yarn.lock" , "./" ] | |
FROM base AS dev | |
ENV NODE_ENV=dev | |
RUN yarn install --frozen-lockfile | |
COPY . . | |
EXPOSE 3001 | |
CMD [ "yarn", "start:dev" ] | |
FROM base AS prod | |
ENV NODE_ENV=production | |
RUN yarn install --frozen-lockfile --production | |
COPY . . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment