fix: switch to Debian 11 (bullseye) for native OpenSSL 1.1.x - no more Prisma issues
This commit is contained in:
parent
518dabef62
commit
074dce6910
@ -1,12 +1,12 @@
|
||||
# Multi-stage build for Next.js 16 with Webpack + Prisma
|
||||
# Using Debian Slim for OpenSSL 3.x compatibility
|
||||
# Using Debian 11 (bullseye) for native OpenSSL 1.1.x support
|
||||
|
||||
FROM node:22-slim AS base
|
||||
FROM node:22-bullseye-slim AS base
|
||||
|
||||
FROM base AS deps
|
||||
WORKDIR /app
|
||||
|
||||
# Install OpenSSL (already 3.x in Debian Slim)
|
||||
# Install OpenSSL (1.1.x native in Debian 11)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
openssl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
@ -20,10 +20,7 @@ WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
|
||||
# Force Prisma to use OpenSSL 3.x (Debian 12)
|
||||
ENV PRISMA_BINARY_TARGETS=native,debian-openssl-3.0.x
|
||||
|
||||
# Generate Prisma Client with forced binary target
|
||||
# Generate Prisma Client (will use debian-openssl-1.1.x native)
|
||||
RUN npx prisma generate
|
||||
|
||||
# Build Next.js with Webpack
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
output = "./client-generated"
|
||||
binaryTargets = ["native", "debian-openssl-3.0.x"] // Force OpenSSL 3.x for Debian Slim
|
||||
}
|
||||
|
||||
datasource db {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user