From 44119422f6bb3f30292f7e733cd1cc701fdba81e Mon Sep 17 00:00:00 2001 From: Manuel Date: Sat, 5 Aug 2023 11:33:29 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Add=20db=20migration=20and=20fix?= =?UTF-8?q?=20build=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 ++ package.json | 2 +- scripts/run.sh | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cebba553c..8cc31a5e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,8 @@ COPY package.json ./package.json COPY .next/standalone ./ COPY .next/static ./.next/static +COPY prisma/schema.prisma prisma/schema.prisma + COPY ./scripts/run.sh ./scripts/run.sh EXPOSE 7575 diff --git a/package.json b/package.json index f2e8c75eb..a92fbeac9 100644 --- a/package.json +++ b/package.json @@ -78,6 +78,7 @@ "next-auth": "^4.22.3", "next-i18next": "^13.0.0", "nzbget-api": "^0.0.3", + "prisma": "^5.0.0", "prismjs": "^1.29.0", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -119,7 +120,6 @@ "happy-dom": "^10.0.0", "node-mocks-http": "^1.12.2", "prettier": "^3.0.0", - "prisma": "^5.0.0", "sass": "^1.56.1", "ts-node": "latest", "turbo": "latest", diff --git a/scripts/run.sh b/scripts/run.sh index e3fbd74c2..cc577e94f 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -1,4 +1,10 @@ #!/bin/sh +echo "Exporting hostname..." export NEXTAUTH_URL_INTERNAL="http://$HOSTNAME:7575" + +echo "Pushing database changes..." +npx prisma db push --skip-generate + +echo "Starting production server..." node /app/server.js \ No newline at end of file