diff --git a/Dockerfile b/Dockerfile index 65f35b3..1c74935 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,6 @@ COPY . . RUN npm run build -RUN npx prisma generate - EXPOSE 3000 CMD ["npm", "run", "start:dev"] diff --git a/docker-compose.yaml b/docker-compose.yaml index a223e9c..08c1b74 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -27,4 +27,8 @@ services: - .:/usr/src/app - /usr/src/app/node_modules depends_on: - - db \ No newline at end of file + - db + command: > + sh -c "npx prisma generate && + npx prisma migrate deploy && + npm run start:dev" \ No newline at end of file