diff --git a/Dockerfile b/Dockerfile index a0ef853..cf57695 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,4 +31,4 @@ USER nextjs EXPOSE 3000 -CMD ["yarn", "start"] \ No newline at end of file +CMD ["yarn", "run", "start:migrate"] \ No newline at end of file diff --git a/package.json b/package.json index 78c55a7..616d5ee 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "build": "next build", "start": "next start", "prisma:generate": "prisma generate", + "start:migrate": "prisma migrate deploy && yarn run start", "export": "next build && next export", "test-build": "tsc", "lint": "next lint",