Skip to content

Commit

Permalink
Add Dockerfile and .dockerignore
Browse files Browse the repository at this point in the history
  • Loading branch information
cyri113 authored May 25, 2023
1 parent 8c7fce3 commit b15ab09
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.github/
coverage/
dist/
node_modules/

.env
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:18-alpine AS base
WORKDIR /project
COPY . .
RUN npm ci

FROM base AS test
CMD [ "npx", "jest", "--coverage" ]

FROM base AS build
RUN npm run build

FROM build AS prod
RUN npm ci --omit=dev
CMD ["npm", "run", "start"]

0 comments on commit b15ab09

Please sign in to comment.