Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add Dockerfile to dockerize the app
- Loading branch information
1 parent
83138a0
commit e10c363
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM node:8 AS builder | ||
RUN mkdir /app | ||
WORKDIR /app | ||
COPY . . | ||
RUN npm install && npm run build | ||
|
||
FROM node:8-alpine | ||
ENV NODE_ENV=production | ||
RUN mkdir /app /app/logs | ||
WORKDIR /app | ||
COPY --from=builder package* ./ | ||
COPY --from=builder /app/dist ./dist | ||
COPY --from=builder /app/i18n ./i18n | ||
RUN npm install --only=production | ||
EXPOSE 3000 | ||
CMD npm start |