Fix Dockerfile for NextAuth + Prisma deployment

Add Prisma support to Docker build:
- Run 'prisma generate' during Docker build
- Copy Prisma client and schema to production image
- Remove 'prisma db push' from build script (runs at startup)
- Enable Next.js standalone output mode
- Add db-setup.sh script for runtime migrations

This fixes the deployment failure where Prisma wasn't available.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-17 15:36:44 -08:00
parent bbb22f1c37
commit 65ea7ac180
3 changed files with 17 additions and 2 deletions

View File

@@ -4,7 +4,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "prisma generate && prisma db push --accept-data-loss && next build",
"build": "next build",
"start": "next start",
"lint": "eslint",
"postinstall": "prisma generate",