diff --git a/Dockerfile b/Dockerfile index 1ae810384..86df5d074 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,4 +9,4 @@ RUN npm ci COPY ./ ./ RUN npm run build -CMD ["./scripts/start.sh"] \ No newline at end of file +CMD ["npm", "run", "docker:migrate:dev"] \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev index 556ca522f..b096ce959 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -6,4 +6,4 @@ RUN npm ci COPY ./ ./ -CMD ["./scripts/start.dev.sh"] \ No newline at end of file +CMD ["npm", "run", "docker:migrate:dev"] \ No newline at end of file diff --git a/package.json b/package.json index 2f28d2491..51f9aa3fa 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "docker:migrate:dev": "npx prisma migrate dev --name init && next dev" }, "prisma": { "schema": "src/prisma/schema.prisma"