mirror of
https://github.com/civitai/civitai.git
synced 2026-09-20 22:08:18 +08:00
fix(docker): bump base image from alpine3.16 to alpine3.20
node:20-alpine3.16 is a frozen tag — Alpine 3.16 went EOL in May 2024
and Docker Hub stopped publishing newer Node 20 builds against it,
locking the runtime at Node 20.2.0 (May 2023).
The stale Node ABI and old musl 1.2.3 are the most likely cause of the
recurring SIGSEGV (exitCode=139) crashes seen on civitai-dp-prod SSR
pods — ~50/day across all SSR-eligible nodes. The Prisma 6.13 native
musl engine was published ~14 months after this Node build, exactly
the skew that produces native segfaults on edge cases like a Postgres
connection closing mid-query (the chronic "Error { kind: Closed }"
pattern in our logs).
alpine3.20 ships current Node 20.18+, current openssl 3.0.13, and
musl 1.2.5. Same major Node, same package manager, same build steps —
no application changes required.
This commit is contained in:
committed by
Zachary Lowden
parent
b10038aafd
commit
d9e2269bd9
+3
-3
@@ -1,6 +1,6 @@
|
||||
##### DEPENDENCIES
|
||||
|
||||
FROM node:20-alpine3.16 AS deps
|
||||
FROM node:20-alpine3.20 AS deps
|
||||
RUN apk add --no-cache libc6-compat
|
||||
WORKDIR /app
|
||||
|
||||
@@ -23,7 +23,7 @@ RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store \
|
||||
|
||||
##### BUILDER
|
||||
|
||||
FROM node:20-alpine3.16 AS builder
|
||||
FROM node:20-alpine3.20 AS builder
|
||||
ARG NEXT_PUBLIC_IMAGE_LOCATION
|
||||
ARG NEXT_PUBLIC_CONTENT_DECTECTION_LOCATION
|
||||
ARG NEXT_PUBLIC_MAINTENANCE_MODE
|
||||
@@ -44,7 +44,7 @@ RUN --mount=type=cache,target=/app/.next/cache \
|
||||
|
||||
##### RUNNER
|
||||
|
||||
FROM node:20-alpine3.16 AS runner
|
||||
FROM node:20-alpine3.20 AS runner
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
Reference in New Issue
Block a user