Database 2

fix for vercel build
This commit is contained in:
Stefan Lazic committed 2026-08-07 17:39:31 +01:00
1 parent 51de4f4ef5
commit 9949e2275e
2 files changed
+5 -5

No files matched your search

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