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
|
# 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
|
FROM base AS deps
|
||||||
WORKDIR /app
|
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 \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
openssl \
|
openssl \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
@ -20,10 +20,7 @@ WORKDIR /app
|
|||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Force Prisma to use OpenSSL 3.x (Debian 12)
|
# Generate Prisma Client (will use debian-openssl-1.1.x native)
|
||||||
ENV PRISMA_BINARY_TARGETS=native,debian-openssl-3.0.x
|
|
||||||
|
|
||||||
# Generate Prisma Client with forced binary target
|
|
||||||
RUN npx prisma generate
|
RUN npx prisma generate
|
||||||
|
|
||||||
# Build Next.js with Webpack
|
# Build Next.js with Webpack
|
||||||
|
|||||||
@ -2,9 +2,8 @@
|
|||||||
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||||||
|
|
||||||
generator client {
|
generator client {
|
||||||
provider = "prisma-client-js"
|
provider = "prisma-client-js"
|
||||||
output = "./client-generated"
|
output = "./client-generated"
|
||||||
binaryTargets = ["native", "debian-openssl-3.0.x"] // Force OpenSSL 3.x for Debian Slim
|
|
||||||
}
|
}
|
||||||
|
|
||||||
datasource db {
|
datasource db {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user