fix: use node:20-slim runtime to resolve Prisma OpenSSL/musl issue

This commit is contained in:
BetterHuman
2026-05-05 23:23:09 +00:00
parent 6c1dc32884
commit af9873ffed
+3 -3
View File
@@ -18,11 +18,11 @@ COPY backend/ ./
RUN npx prisma generate --schema=src/prisma/schema.prisma
RUN npm run build
# Stage 3: Production
FROM node:20-alpine
# Stage 3: Production (Debian slim to match build stage, avoiding Alpine musl/OpenSSL issues)
FROM node:20-slim
WORKDIR /app
RUN apk add --no-cache nginx
RUN apt-get update && apt-get install -y nginx openssl --no-install-recommends && rm -rf /var/lib/apt/lists/*
# Copy backend
COPY --from=backend-build /app/backend/dist ./dist