Fix back dockerfile

This commit is contained in:
Zoe Roux
2022-09-27 11:40:53 +09:00
parent 5cdd06a5bd
commit d4a114dca7
2 changed files with 14 additions and 3 deletions

10
back/.dockerignore Normal file
View File

@@ -0,0 +1,10 @@
node_modules
Dockerfile
Dockerfile.dev
dist
test
.dockerignore
.gitignore
.eslintrc.json
.pretiierrc
README.MD

View File

@@ -1,7 +1,8 @@
FROM node:17 FROM node:17
WORKDIR /app WORKDIR /app
COPY ./package.json ./ COPY ./package.json ./package-lock.json ./
RUN npm install RUN npm install --frozen-lockfile
COPY . . COPY . .
RUN npx prisma generate
RUN npm run build RUN npm run build
CMD npx prisma generate ; npx prisma migrate dev ; npm run start:prod CMD npx prisma migrate ; npm run start:prod