Fix Prisma OpenSSL error on Alpine Linux
- Add binaryTargets = ["native", "linux-musl-openssl-3.0.x"] to the Prisma generator so the correct engine binary is bundled for Alpine - Install openssl in the runtime Docker stage via apk Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
generator client {
|
generator client {
|
||||||
provider = "prisma-client-js"
|
provider = "prisma-client-js"
|
||||||
|
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
|
||||||
}
|
}
|
||||||
|
|
||||||
datasource db {
|
datasource db {
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ RUN npx tsc
|
|||||||
# ---- Runtime stage ----
|
# ---- Runtime stage ----
|
||||||
FROM node:20-alpine AS runner
|
FROM node:20-alpine AS runner
|
||||||
|
|
||||||
|
# Prisma needs libssl on Alpine (musl)
|
||||||
|
RUN apk add --no-cache openssl
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy only production runtime artifacts
|
# Copy only production runtime artifacts
|
||||||
|
|||||||
Reference in New Issue
Block a user