Docker Compose at home: one deployment page for a homelab, and the drift between the compose files and the wiki #704
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#704
Loading…
Reference in a new issue
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?
From the list: “Since it is mostly a homelab oriented project. Improve the documentation on the deployment using docker compose.” The Compose files work, but what an operator needs is spread over five wiki pages and the README, several parts of it contradict the files, and nothing covers what a homelab has: a reverse proxy container, a NAS volume, a stack manager, unattended updates. This issue is the documentation, written after the compose bugs that make it true are fixed.
What exists today
The files (
docker/compose.yml,docker/compose.postgres.yml,.env.example, 239 lines) and where the documents disagree with them, each checked on 2026-10-02:Installing-Postulo.md:236), whiledocker/compose.yml:45-123defines aschedulerand aworkerbehind profiles,.env.example:120-128explainsPOSTULO_BACKGROUND_WORK, andConfiguration.md:337-360and:408-446document both. With Docker (Installing-Postulo.md:46-83) mentions neither. The PostgreSQL half of this is #581.…/postulo:0.2(docker/compose.yml:29,:50,:93;docker/compose.postgres.yml:23,:51;Installing-Postulo.md:141,:346), #403.Installing-Postulo.md:307-324saysgit pull,build --pull,up -d;:346-352sayspullandup -d;:322-324and:97-98add re-runningfetch_escoafter every upgrade (#411 is the open bug that the documented fetch fails in the image).Installing-Postulo.md:6-12andREADME.md:174-182start withgit clone, because the compose file hasbuild: context: ..(compose.yml:23-25) andenv_file: ../.env(:31-32). A Compose project pasted into a stack manager has neither..env.exampleis written for development. Its first line is “Every variable is optional in development”;POSTULO_DEBUG=trueis live (:13) and ignored in the image (src/postulo/config/settings/prod.py:18);POSTULO_ALLOWED_HOSTS=localhost,127.0.0.1is live (:14) and refuses a real host name until edited; the secret key is commented out (:11); the CSRF origin, needed behind a proxy on a real domain, is commented out (:16); the short version names only two variables to set. Its commented examplesPOSTULO_MEDIA_ROOT=/var/lib/postulo/mediaandPOSTULO_STATIC_ROOT(:107-108) are not the image's paths (/app/data/media,/app/staticfiles,docker/Dockerfile:153,:156): uncommented in a compose.env, they would put uploads outside the volume.Hardening.md:6-70explainsPOSTULO_TRUSTED_PROXIESand names Traefik once, as an anecdote about a rewritten header (:59). There is no Traefik, Caddy or nginx example anywhere in the wiki (Configuration.md:264-265is the only nginx text, for sending files). The compose files publish127.0.0.1:8000:8000and declare no network (compose.yml:38-39), so a proxy container cannot reach it through the host's loopback, which is the caseHardening.md:22names without showing. The example value172.18.0.0/16(.env.example:94) is whichever subnet Docker chose.postulo-dataat/app/data(compose.yml:37,:125-126) holds the SQLite file, media, plugins, backups and the GeoNames table (docker/Dockerfile:147-155). The image runs asuid 1000(:324,USER postulo:329), so a bind mount owned by anyone else cannot be written; no wiki page mentions bind mounts, ownership, or SELinux labels. SQLite runs in WAL mode (src/postulo/config/sqlite.py:32-35,:50), and SQLite's own documentation says “WAL does not work over a network filesystem”:/app/dataon an NFS or SMB share of a NAS is a trap, and it is the first thing a homelab reaches for./app/data/backupson the same volume (Backups-and-your-data.md:156,:253-255); the restore recipe stopspostulo schedulerand notworker(:225, #541); the cron lines use/data/stacks/postulo/docker/compose.yml(Backups-and-your-data.md:183,Configuration.md:356), a path nobody has.docker/entrypoint.sh:22-30, #366), which a firewalled homelab sees as a failed fetch; the ESCO step is in the wiki and not in the README quick start; the wiki sayscreatesuperuseris optional and the README lists it.Troubleshooting.md:17saysdocker logs postulo; the compose files set nocontainer_name, so Compose's own naming applies (postulo-postulo-1for projectpostulo, servicepostulo; not run here).*_FILEform exists inconfig/settings, so Docker or Portainer secrets cannot be used directly.docker/.envand pasted into a URL), #540, #541, #542, #584; closed: #219, #234.Checked against
mainatf09b6010band the wiki as it stood with it.Proposal
Installing-Postulo.mdsections With Docker, the Docker parts of Upgrading and Releases and upgrading, and the Docker lines in Configuration, Backups and Hardening become links to it).Installing-Postulo.mdkeeps the non-container path.env_filebeside it, a.envwith only what a real deployment needs (key, hosts, CSRF origin, trusted proxies, time zone, mail), the volume or a bind mount with the ownership step, healthchecks, and theschedulerandworkerservices with the rule thatPOSTULO_BACKGROUND_WORKand the worker go together.POSTULO_TRUSTED_PROXIESvalue read from Server settings → Overview, and the header and body-size notes from Hardening.pullandup -dafter a backup, why there is no downgrade (migrations run on start,docker/entrypoint.sh:10-13; the way back is a restore), a backup copied off the volume, and a cron or systemd timer.Decisions
docker/compose.yml, and the release-attachment question left to #403.Hardening.md:59). Recommended: show the Traefik example as tested, run the Caddy one once before publishing it, and label every other platform's notes “not tested”; do not write instructions nobody has followed.*_FILEvariables, or only document the environment. Recommended: document the environment now;*_FILEsupport is its own enhancement if the maintainer wants it.Builds on
Issues #345, #403, #581, #582, #540, #541, #542, #584, #411, #366, and closed #219, #234. The page is written after #403, #581 and #582 are fixed (0.5.0), or it documents bugs.
Done when
grepfinds no “no background worker” sentence.tests/test_wiki_surface.py(it skips where the wiki is not checked out beside the repository) parses the page's Compose block as YAML and holds it todocker/compose.yml: the same services, the image tag equal to the minor ofpyproject.toml's version, everyPOSTULO_*name in it one thatconfig/settingsreads.tests/test_image_build.pyalready reads the compose files and gains #403's tag check..env.example's header and the wiki's short version agree on the first-run steps.f09b6010b) and the candidate format (4) stay as they are; the wiki is English first, with translation following #352.From the list of improvements of 2026-10-02.