Skip to content

Commit

Permalink
chore: add Dockerfile to dockerize the app
Browse files Browse the repository at this point in the history
  • Loading branch information
devCrossNet committed May 18, 2018
1 parent 83138a0 commit e10c363
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
@@ -0,0 +1 @@
node_modules
16 changes: 16 additions & 0 deletions Dockerfile
@@ -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

0 comments on commit e10c363

Please sign in to comment.