fix(docker): repair dev stack after observability merge (actuator port + Node 22) #688

Merged
marcel merged 2 commits from fix/dev-docker-actuator-port-and-node22 into main 2026-05-28 09:12:31 +02:00
Owner

Summary

Two independent dev-stack regressions surfaced after the observability work landed on main. Both break docker compose up -d --build even though all images build successfully.

  1. Backend healthcheck hit the wrong port. Observability moved actuator to a separate management port (management.server.port: 8081), but the dev docker-compose.yml healthcheck still probed :8080/actuator/health → 404 → backend reported unhealthyfrontend (which has depends_on: backend healthy) never started, so compose exits 1. docker-compose.prod.yml already used 8081; this aligns dev with it.

  2. Frontend image too old for pdfjs-dist. pdfjs-dist resolves to 5.7.284, which requires Node >=22.13.0 || >=24. With engine-strict=true in .npmrc, npm ci hard-fails on the Node 20 base image and the dev server crash-loops (also blocks a clean build). CI runs the frontend on Node 22 (Playwright image), so the committed lockfile already assumes 22. Bumped all three Dockerfile stages to node:22-alpine3.21.

Changes

  • docker-compose.yml — backend healthcheck :8080:8081
  • frontend/Dockerfilenode:20.19.0-alpine3.21node:22-alpine3.21 (dev, build, production stages)

Test plan

  • Verified actuator answers {"status":"UP"} on :8081 inside the backend container (404 on :8080)
  • docker compose up -d --build brings up all services; backend healthy, frontend dev server reaches VITE ready and serves (HTTP 302 → /login)
  • CI green

Note: these are infra-only fixes, intentionally kept off PR #663 (import-normalizer) since they're unrelated to that PR's scope. The frontend_node_modules named volume must be recreated for the Node 22 deps to take effect on an existing dev environment (docker compose rm -sf frontend && docker volume rm familienarchiv_frontend_node_modules).

🤖 Generated with Claude Code

## Summary Two independent dev-stack regressions surfaced after the observability work landed on `main`. Both break `docker compose up -d --build` even though all images build successfully. 1. **Backend healthcheck hit the wrong port.** Observability moved actuator to a separate management port (`management.server.port: 8081`), but the dev `docker-compose.yml` healthcheck still probed `:8080/actuator/health` → 404 → backend reported **unhealthy** → `frontend` (which has `depends_on: backend healthy`) never started, so compose exits 1. `docker-compose.prod.yml` already used 8081; this aligns dev with it. 2. **Frontend image too old for `pdfjs-dist`.** `pdfjs-dist` resolves to `5.7.284`, which requires Node `>=22.13.0 || >=24`. With `engine-strict=true` in `.npmrc`, `npm ci` hard-fails on the Node 20 base image and the dev server crash-loops (also blocks a clean build). CI runs the frontend on Node 22 (Playwright image), so the committed lockfile already assumes 22. Bumped all three Dockerfile stages to `node:22-alpine3.21`. ## Changes - `docker-compose.yml` — backend healthcheck `:8080` → `:8081` - `frontend/Dockerfile` — `node:20.19.0-alpine3.21` → `node:22-alpine3.21` (dev, build, production stages) ## Test plan - [x] Verified actuator answers `{"status":"UP"}` on `:8081` inside the backend container (404 on `:8080`) - [x] `docker compose up -d --build` brings up all services; backend healthy, frontend dev server reaches `VITE ready` and serves (HTTP 302 → /login) - [ ] CI green > Note: these are infra-only fixes, intentionally kept off PR #663 (import-normalizer) since they're unrelated to that PR's scope. The `frontend_node_modules` named volume must be recreated for the Node 22 deps to take effect on an existing dev environment (`docker compose rm -sf frontend && docker volume rm familienarchiv_frontend_node_modules`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
marcel added 2 commits 2026-05-27 22:46:57 +02:00
The observability work moved actuator to a separate management port
(management.server.port: 8081), but the dev compose healthcheck still
probed :8080/actuator/health, which 404s. The backend was reported
unhealthy and the frontend (depends_on: backend healthy) never started.
docker-compose.prod.yml already uses 8081; this aligns dev with it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
fix(docker): bump frontend image to Node 22 for pdfjs-dist engine requirement
Some checks failed
CI / Unit & Component Tests (pull_request) Successful in 3m51s
CI / OCR Service Tests (pull_request) Successful in 22s
CI / Backend Unit Tests (pull_request) Successful in 3m41s
CI / fail2ban Regex (pull_request) Successful in 45s
CI / Semgrep Security Scan (pull_request) Successful in 23s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m4s
CI / Unit & Component Tests (push) Successful in 3m41s
CI / OCR Service Tests (push) Successful in 21s
CI / fail2ban Regex (push) Has been cancelled
CI / Semgrep Security Scan (push) Has been cancelled
CI / Compose Bucket Idempotency (push) Has been cancelled
CI / Backend Unit Tests (push) Has been cancelled
643d504c7a
pdfjs-dist resolves to 5.7.284, which requires Node >=22.13.0 || >=24.
With engine-strict=true in .npmrc, npm ci hard-fails on the Node 20 base
image, so the frontend dev server crash-loops (and a clean build fails).
CI runs the frontend on Node 22 (Playwright image), so the committed
lockfile already assumes 22. Bump all three Dockerfile stages to match.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
marcel merged commit 643d504c7a into main 2026-05-28 09:12:31 +02:00
marcel deleted branch fix/dev-docker-actuator-port-and-node22 2026-05-28 09:12:31 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marcel/familienarchiv#688