feat(config): add docker

This commit is contained in:
Anthony
2022-07-25 02:14:37 +01:00
parent c06d880f56
commit a38db17468
4 changed files with 51 additions and 1 deletions

20
Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM node:18-buster
WORKDIR /opt/app
COPY --chown=node:node package.json .
COPY --chown=node:node package-lock.json .
COPY --chown=node:node tsconfig.json .
COPY --chown=node:node prisma ./prisma/
RUN npm install
COPY . .
RUN npm run build
RUN chown node:node /opt/app/
USER node
CMD [ "npm", "run", "start:migrate"]