From 54811b8247f071211868b1dfb59810756cae3151 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 17 Feb 2026 23:51:28 +0000 Subject: [PATCH] Fix: skip postinstall in deps stage, run prisma generate in builder --- Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index a1758bd..e0aa5fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,12 +9,9 @@ FROM base AS deps RUN apk add --no-cache libc6-compat python3 make g++ WORKDIR /app -# Copy package files AND prisma schema (needed for postinstall: prisma generate) +# Copy package files only - skip postinstall scripts (prisma generate runs in builder stage) COPY package*.json ./ -COPY prisma ./prisma/ - -# Install dependencies (with legacy peer deps for compatibility) -RUN npm ci --legacy-peer-deps +RUN npm ci --legacy-peer-deps --ignore-scripts # Rebuild the source code only when needed FROM base AS builder @@ -26,7 +23,7 @@ COPY . . ENV NEXT_TELEMETRY_DISABLED=1 ENV NODE_ENV=production -# Generate Prisma Client (needs schema but not DATABASE_URL yet) +# Generate Prisma Client (schema is now available from COPY . .) RUN npx prisma generate # Build the application (DATABASE_URL will be available via Coolify env vars) @@ -58,3 +55,4 @@ EXPOSE 3000 ENV PORT=3000 ENV HOSTNAME="0.0.0.0" +