Database 2
fix for vercel build
This commit is contained in:
2 files changed
+5
-5
No files matched your search
+4
-4
@@ -26,10 +26,10 @@ FROM node:22-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
# These database env vars aren't needed to generate the client (no DB
|
||||
# connection at generate time) — only real values needed at runtime, never
|
||||
# baked in here.
|
||||
RUN npx prisma generate
|
||||
# `npm run build` runs `prisma generate` itself (see package.json — needed
|
||||
# so a plain Vercel/`npm run build` deploy generates the client too, not
|
||||
# just this Docker path, which used to have its own separate `prisma
|
||||
# generate` step here).
|
||||
# `next build`'s page-data collection step imports every route module
|
||||
# (including /api/health) to inspect it — that pulls in
|
||||
# src/lib/db/prisma.ts, which requires DATABASE_HOST/NAME/USER/PASSWORD
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
"description": "Mobile-first barber booking platform — customer, barber and owner experiences in one Next.js app.",
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"build": "prisma generate && next build",
|
||||
"start": "next start",
|
||||
"lint": "eslint .",
|
||||
"typecheck": "tsc --noEmit",
|
||||
|
||||
Reference in new issue
Block a user