Fix Prisma engine load on Alpine: install openssl + pin musl-openssl-3.0.x
Build and Deploy / version (push) Successful in 2s
Build and Deploy / build (push) Successful in 21s
Build and Deploy / deploy (push) Successful in 1s

node:20-alpine ships OpenSSL 3.x and has no libssl.so.1.1. Without the
openssl CLI, Prisma's version detection failed and fell back to the
openssl-1.1.x engine, which then failed to load its shared library and
emitted plain text instead of JSON ("Unexpected token 'E'..."), crashing
`prisma migrate deploy` at container startup.

- Install openssl in the build and runtime stages so detection succeeds
- Pin binaryTargets to linux-musl-openssl-3.0.x so the correct engine is bundled

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-21 17:44:44 +02:00
co-authored by Claude Opus 4.8
parent 1a02408ba0
commit 3dd770a6a5
2 changed files with 6 additions and 1 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
generator client {
provider = "prisma-client-js"
provider = "prisma-client-js"
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
}
datasource db {