docs(legibility): write docs/DEPLOYMENT.md as Day-1 production checklist (DOC-5) #436

Closed
opened 2026-05-05 21:08:15 +02:00 by marcel · 1 comment
Owner

Part of #394 (Epic 2 — Documentation). Rubric checks: C9.1 (Major), C9.2 (Major). Per #394 Decision Queue D1: DOC-5 is a single-page entry-point that links into existing infrastructure docs, not a duplicate.

Problem

An operator deploying Familienarchiv for the first time needs a sequential checklist — not a reference manual. The four docs/infrastructure/*.md docs (ci-gitea.md, production-compose.md, s3-migration.md, self-hosted-catalogue.md) are reference material; they're invisible from the front door. Per Tobias, DOC-5 is the entry-point operators land on first.

Per Nora, DOC-5 must explicitly cover secret management: which env vars are dangerous (have dev defaults), which are fail-fast (must be set or the app crashes), and where MinIO root vs service-account credentials apply.

Scope

  1. Create docs/DEPLOYMENT.md.
  2. Required structure (Day-1 checklist, sequential):
    • Prerequisites — Docker Engine version, ports (80/443/8080/9000/9001/8000), DNS, optional Caddy/Nginx reverse proxy.
    • Secrets checklist (per Nora) — every env var that must be set before first run, classified:
      • Fail-fast (app crashes if missing): DB password, Spring Session secret, OCR X-Training-Token.
      • Dangerous dev defaults (silent fallback to insecure values): MinIO root user/password, MinIO service-account credentials.
      • For MinIO: state explicitly that the application should use a service-account, not root credentials. Flag as "production hardening required" if not yet implemented.
    • Bring-up commandsdocker compose -f docker-compose.yml -f docker-compose.prod.yml up -d (or whatever the production overlay is). Link to docs/infrastructure/production-compose.md for the full file.
    • Health verification/health endpoints, OCR cold-start 30–60s warning (per Tobias: model loading), docker compose ps checks.
    • First-run database seed — initial admin user creation.
    • Operational sections — short paragraphs each linking to:
      • docs/infrastructure/s3-migration.md (storage migration)
      • docs/infrastructure/ci-gitea.md (CI runner)
      • docs/infrastructure/self-hosted-catalogue.md (full self-hosted stack inventory)
      • docs/security-guide.md (production hardening)
    • Cost — per Tobias: include the ~23 EUR/month figure so future maintainers understand the infrastructure budget.
  3. Link from README.md (DOC-1) under "I want to run it locally / in production."
  4. Operational scripts (scripts/clean-e2e-data.sh, download-paperless.sh, flatten-paperless.sh, reset-db.sh) — DOC-7 decides whether they live here ("Operational scripts") or in CONTRIBUTING.md ("Development scripts").

References

Acceptance criteria

  • docs/DEPLOYMENT.md exists.
  • Behavioural test (per Elicit): a developer who has never run the system can follow DOC-5 alone to bring the production stack to a healthy state on a fresh VPS.
  • "Secrets checklist" lists every must-set env var with fail-fast vs dev-default classification.
  • Every operational section either contains the content or links to the canonical infrastructure doc — no duplication.
  • Linked from README.md.
  • Rubric C9.1, C9.2 PASS verified by reviewer.

Definition of Done

DEPLOYMENT.md is on main. Behavioural test passes (verifiable by handing the doc to someone unfamiliar with the stack). Rubric C9.1, C9.2 PASS.

Part of #394 (Epic 2 — Documentation). Rubric checks: C9.1 (Major), C9.2 (Major). Per #394 Decision Queue **D1**: DOC-5 is a single-page **entry-point that links into existing infrastructure docs**, not a duplicate. ## Problem An operator deploying Familienarchiv for the first time needs a sequential checklist — not a reference manual. The four `docs/infrastructure/*.md` docs (`ci-gitea.md`, `production-compose.md`, `s3-migration.md`, `self-hosted-catalogue.md`) are reference material; they're invisible from the front door. Per Tobias, DOC-5 is the entry-point operators land on first. Per Nora, DOC-5 must explicitly cover **secret management**: which env vars are dangerous (have dev defaults), which are fail-fast (must be set or the app crashes), and where MinIO root vs service-account credentials apply. ## Scope 1. Create `docs/DEPLOYMENT.md`. 2. Required structure (Day-1 checklist, sequential): - **Prerequisites** — Docker Engine version, ports (80/443/8080/9000/9001/8000), DNS, optional Caddy/Nginx reverse proxy. - **Secrets checklist** (per Nora) — every env var that must be set before first run, classified: - **Fail-fast** (app crashes if missing): DB password, Spring Session secret, OCR `X-Training-Token`. - **Dangerous dev defaults** (silent fallback to insecure values): MinIO root user/password, MinIO service-account credentials. - For MinIO: state explicitly that the application should use a service-account, not root credentials. Flag as "production hardening required" if not yet implemented. - **Bring-up commands** — `docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d` (or whatever the production overlay is). Link to `docs/infrastructure/production-compose.md` for the full file. - **Health verification** — `/health` endpoints, OCR cold-start 30–60s warning (per Tobias: model loading), `docker compose ps` checks. - **First-run database seed** — initial admin user creation. - **Operational sections** — short paragraphs each linking to: - `docs/infrastructure/s3-migration.md` (storage migration) - `docs/infrastructure/ci-gitea.md` (CI runner) - `docs/infrastructure/self-hosted-catalogue.md` (full self-hosted stack inventory) - `docs/security-guide.md` (production hardening) - **Cost** — per Tobias: include the ~23 EUR/month figure so future maintainers understand the infrastructure budget. 3. Link from `README.md` (DOC-1) under "I want to run it locally / in production." 4. Operational scripts (`scripts/clean-e2e-data.sh`, `download-paperless.sh`, `flatten-paperless.sh`, `reset-db.sh`) — DOC-7 decides whether they live here ("Operational scripts") or in CONTRIBUTING.md ("Development scripts"). ## References - Parent: #394 - Rubric: C9.1, C9.2 - Existing docs (link, don't duplicate): `docs/infrastructure/*.md`, `docs/security-guide.md` - Inputs to migrate (DOC-7): `infra/CLAUDE.md`, `scripts/CLAUDE.md` - Memory: `Spring 7 kills @Lazy cycle fix` (Spring Boot 4 production behaviour) ## Acceptance criteria - [ ] `docs/DEPLOYMENT.md` exists. - [ ] **Behavioural test (per Elicit)**: a developer who has never run the system can follow DOC-5 alone to bring the production stack to a healthy state on a fresh VPS. - [ ] "Secrets checklist" lists every must-set env var with **fail-fast vs dev-default** classification. - [ ] Every operational section either contains the content or links to the canonical infrastructure doc — no duplication. - [ ] Linked from `README.md`. - [ ] Rubric C9.1, C9.2 PASS verified by reviewer. ## Definition of Done DEPLOYMENT.md is on `main`. Behavioural test passes (verifiable by handing the doc to someone unfamiliar with the stack). Rubric C9.1, C9.2 PASS.
marcel added this to the (deleted) milestone 2026-05-05 21:08:15 +02:00
marcel added the P1-highdocumentationlegibility labels 2026-05-05 21:08:22 +02:00
Author
Owner

Duplicate of #399. I created this in error before noticing #399 already existed. #399 carries the persona reviews and per-child Decision Queue; closing this in favor of the existing issue.

**Duplicate of #399.** I created this in error before noticing #399 already existed. #399 carries the persona reviews and per-child Decision Queue; closing this in favor of the existing issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marcel/familienarchiv#436