From a56d8d3f6b82b9b7ef8344545cffba784da2e299 Mon Sep 17 00:00:00 2001 From: Paulius Juzenas <59730296+Paulijuz@users.noreply.github.com> Date: Sat, 14 Oct 2023 12:38:01 +0200 Subject: [PATCH] fix: statrup migrate --- Dockerfile | 2 +- Dockerfile.dev | 2 +- package.json | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) 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"