Self-hosting guide and reference compose distribution #88
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#88
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The kickoff bar: a stranger with Docker can install, update, and back up Dorfteich using only the guide.
Scope
Write
docs/self-hosting/: requirements, install (referencedocker-compose.yml+.env.example— published variant consuming release images by semver tag, optionalcaddyTLS profile — implement that profile), first-run wizard walkthrough, update procedure (+ downgrade window), backup/restore with the sidecar, troubleshooting (readyz interpretation, logs, common proxy/WebSocket mistakes), upgrade-from-source note; verify by a scripted clean-VM install test.Acceptance criteria
Technical notes
Dependencies
Depends on #80, #83.
Size: ~2 days
Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add
deanden), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.Implemented in
4b55fb9(pipeline green, 8/8; clean-machine install verified live on the stage host).docs/self-hosting/README.md— the complete operator contract, linked from the repository README: requirements; install from exactly the published reference files (deploy/compose/docker-compose.yml+.env.example, plusCaddyfilefor the profile); first-run wizard walkthrough incl. the pre-seeding path; update procedure (TAGbump +pull+up -d, migrations auto-apply) with the one-minor-release downgrade window and the restore fallback; backup/restore with the #83 sidecar; troubleshooting keyed to readyz semantics (503vsdegraded, per-check details) plus the classic operator mistakes (missing WebSocket upgrade on/collab,APP_BASE_URLvs CSRF/mail links, lostdb-datavolume); build-from-source note (the reference compose keeps its build contexts).caddyTLS profile, implemented — new opt-in service in the reference compose (profiles: [caddy], inert for everyone with their own proxy and for the stages) +deploy/compose/Caddyfile: publishes 80/443, terminates TLS for$DOMAINwith automatic Let's Encrypt, routes/api/*→ api,/collab*→ collab (WebSocket), rest → web — the same routing the stage vhosts use.DOMAIN=localhost(default) issues an internal-CA certificate for smoke tests. New.envkeys documented:DOMAIN,CADDY_HTTP_PORT,CADDY_HTTPS_PORT.Acceptance criteria
deploy/self-hosting-verify.sh: fresh temp directory, copies only the three published files, scripts the guide's.envedits,docker compose --profile caddy up -d, waits forGET /api/v1/setup→{"status":"required",…}over TLS, asserts the certificate is Caddy-issued and the SPA shell serves through the ingress, then tears down (own project name, ephemeral ports — safe next to live stacks). Ran green on ONE.DOMAIN=localhost(real TLS handshake, Caddy internal CA): both hosts' ports 80/443 are occupied by the stage proxies, so public-domain ACME cannot be exercised anywhere today. The Let's-Encrypt path is Caddy's default behavior for any realDOMAIN; exercising it on a public domain is recorded as a go-live checklist item (#89)..env.exampleis the single, fully commented reference (audited against the compose file: every${VAR}appears with default and effect).Stage composes on ONE resynced to the repo state (backups
*.bak-pre88); the profile stays inactive there. The published-variant note (semverTAGs) points at #89 — until the first release,testis the documented tag.