Fix Prisma client generation for correct platform
- Skip Prisma postinstall during npm ci with --ignore-scripts - Generate Prisma client explicitly in builder stage - Ensures correct binary for Debian/Linux platform
This commit is contained in:
@@ -8,7 +8,8 @@ WORKDIR /app
|
|||||||
|
|
||||||
# Copy package files
|
# Copy package files
|
||||||
COPY package.json package-lock.json* ./
|
COPY package.json package-lock.json* ./
|
||||||
RUN npm ci
|
# Install dependencies but skip Prisma postinstall
|
||||||
|
RUN npm ci --ignore-scripts
|
||||||
|
|
||||||
# Rebuild the source code only when needed
|
# Rebuild the source code only when needed
|
||||||
FROM base AS builder
|
FROM base AS builder
|
||||||
@@ -17,8 +18,8 @@ WORKDIR /app
|
|||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Generate Prisma Client
|
# Generate Prisma Client for the correct platform (Debian)
|
||||||
RUN npx prisma generate
|
RUN npx prisma generate --generator client
|
||||||
|
|
||||||
# Build Next.js application
|
# Build Next.js application
|
||||||
ENV NEXT_TELEMETRY_DISABLED 1
|
ENV NEXT_TELEMETRY_DISABLED 1
|
||||||
|
|||||||
Reference in New Issue
Block a user