From 726af331be49ef1f6c63d10272d8fe332d5feaed Mon Sep 17 00:00:00 2001 From: choidabom <48302257+choidabom@users.noreply.github.com> Date: Wed, 23 Oct 2024 12:03:08 +0900 Subject: [PATCH] Add `postinstall` script for prisma schema generation (#370) * Update README to include database schema generation instruction * Remove README and add `postinstall` in backend/package.json * Fix postinstall command * Fix format --- Dockerfile | 1 - backend/package.json | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 524f811e..21664696 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,6 @@ RUN mkdir /usr/share/fonts/nanumfont && \ fc-cache -f -v # Set the environment variables -ENV NODE_ENV production ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true ENV PUPPETEER_EXECUTABLE_PATH /usr/bin/chromium-browser diff --git a/backend/package.json b/backend/package.json index 17ed4360..b21d5b4d 100644 --- a/backend/package.json +++ b/backend/package.json @@ -6,6 +6,7 @@ "license": "Apache-2.0", "scripts": { "build": "nest build", + "postinstall": "pnpm run db:generate", "db:generate": "prisma generate --schema=prisma/schema.prisma", "start": "nest start", "start:dev": "nest start --watch",