fix: align app/db image bases with documented stack (E00-S02-T01)
CI / Frozen lockfile install (pull_request) Successful in 48s

Switch the app image from node:24-alpine to node:24.19.0-bookworm-slim in
both build and runtime stages (Technology-Stack 5.4: glibc Debian base
required because argon2 is a native dependency; musl/Alpine causes
native-module build surprises), and the db image from postgres:16-alpine
to postgres:18-bookworm (Technology-Stack 5.2/5.4/6.2 + golden tuple 7
pin PostgreSQL 18.6; 18-bookworm is the 18.x line on Debian bookworm).

Update tests/compose-config.test.mjs so the committed assertions lock in
the corrected image bases (db image, Dockerfile build/runtime stages,
parser probe).
This commit is contained in:
implementer
2026-08-28 23:45:18 +00:00
parent 3be575818d
commit 3bbea68e6c
3 changed files with 22 additions and 15 deletions
+8 -4
View File
@@ -3,15 +3,19 @@
# @personal-blog/server — EPPP public server application image.
#
# [E00-S02-T01] baseline: builds the workspace server package with the pinned
# toolchain (Node 24 + pnpm 11.23.0, frozen lockfile) and runs the compiled
# toolchain (Node 24.19.0 + pnpm 11.23.0, frozen lockfile) and runs the compiled
# entrypoint. The server is still a bootstrap placeholder (its module loads and
# exits cleanly); the Fastify 5 application shell that turns it into a serving
# process lands in a later story, and the health gate (T02), health endpoint
# (T03), volume persistence (T04), non-root/read-only hardening and multi-arch
# targets are later E00-S02 tasks — all out of scope here.
#
# Image base: node:24.19.0-bookworm-slim (glibc Debian) per Technology-Stack
# §5.4 — argon2 is a native dependency and musl/Alpine causes native-module
# build surprises, so the image must stay on a glibc base.
# --- build stage: install the frozen workspace and compile the server --------
FROM node:24-alpine AS build
FROM node:24.19.0-bookworm-slim AS build
WORKDIR /app
# Enable the pinned pnpm (11.23.0, via packageManager in the root package.json)
@@ -33,8 +37,8 @@ RUN pnpm install --frozen-lockfile
COPY apps/server apps/server
RUN pnpm --filter @personal-blog/server build
# --- runtime stage: Node 24 + compiled output only ----------------------------
FROM node:24-alpine AS runtime
# --- runtime stage: Node 24.19.0 (bookworm-slim) + compiled output only ------
FROM node:24.19.0-bookworm-slim AS runtime
WORKDIR /app
ENV NODE_ENV=production