Create .env.example and DEPLOYMENT.md for production onboarding #139
Reference in New Issue
Block a user
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?
Why
There is no
.env.exampleat the repo root and no deployment documentation. This means:.envfile contains real credentials and must never be committed — but without a documented template, someone will eventually commit it.What to do
1. Create
.env.exampleA complete template of every variable the stack needs, with placeholder values and inline comments explaining what each variable does and where to get it.
Required sections:
ORIGINAll secret values must be replaced with descriptive placeholders like
<your-strong-password>, never dummy values likepassword123that someone might accidentally use in production.2. Create
DEPLOYMENT.mdA step-by-step production deployment guide. It should cover:
Prerequisites
rcloneinstalled and configured for Hetzner Object Storage (see backup scripts)First deployment
.env.exampleto.envand fill in all valuesE2E_ADMIN_PASSWORD(refs #128)docker compose -f docker-compose.yml -f docker-compose.prod.yml up -dcurl https://your-domain/api/actuator/healthUpdating the application
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --no-deps backend frontendDatabase migrations
Flyway runs automatically on backend startup. If a migration fails, the backend will refuse to start — check logs with
docker logs archive-backend.Backup setup
Reference the steps from #139 (backup scripts issue).
Secrets rotation
How to rotate the database password, S3 credentials, and session secret without downtime.
Disaster recovery
How to restore the database from a backup file.
Acceptance criteria
.env.exampleexists at the repo root and contains every variable that appears indocker-compose.ymlanddocker-compose.prod.yml..env.example— only placeholders..envis listed in.gitignore(verify it already is).DEPLOYMENT.mdcovers first deployment, updates, and backup setup end-to-end.DEPLOYMENT.mdand get a working production instance without asking questions.Audit-derived scope addition (2026-05-07)
Audit found the following prod-essential docs missing from
docs/:README.md— presentCONTRIBUTING.md,COLLABORATING.md,CODESTYLE.md— presentARCHITECTURE.md— presentdocs/adr/— well-formatted (Nygard)docs/RUNBOOK.md— missing (start/stop, common operations, restore procedure, log locations)docs/INCIDENT_RESPONSE.md— missing (escalation, recovery steps, on-call hand-off)Suggested AC additions to this issue
docs/RUNBOOK.mdcovering at minimum:docs/INCIDENT_RESPONSE.mdcovering:.env.example— already covered in this issue's title; ensure it documents every env var consumed by the stack (rungrep -RE '\$\{[A-Z_]+}' docker-compose*.ymlto enumerate).Tracked in audit doc as F-26 (Low) — but operationally important for the same reason backups are: a solo-maintained system needs runbooks for the moment the maintainer is unavailable.