Docker: the compose files set no log size limit, and the healthcheck adds an access line every 30 seconds #1126
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#1126
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?
What exists today
None of
docker/compose.yml,compose.postgres.yml,compose.build.yml,compose.postgres.build.ymlorcompose.hardened.ymlhas alogging:key (grep forlogging:andmax-sizefinds nothing). Docker's defaultjson-filedriver keeps every line for the life of the container unless the host'sdaemon.jsonsetslog-opts; most hosts do not. The wiki's installation pages do not mention it either (grep ofpostulo.wikiformax-sizeandlogging:finds nothing relevant).docker/Dockerfile:360-361runscurl -fsS http://127.0.0.1:8000/healthzevery 30 s, and the gunicorn command (lines 391-394) writes every request to the access log with--access-logfile -, so the container log gets oneGET /healthzline every 30 s, 2,880 a day, for as long as the container runs. The worker and scheduler override the healthcheck with afindon their heartbeat files (compose.yml:69,:111), so this is the web container only. The larger stream is the worker's (B1).What would change
logging: *loggingonpostulo,scheduler,worker(anddbin the PostgreSQL file). Docker'slocaldriver is the one Docker's own documentation recommends (compressed, rotated by default);json-filewithmax-size/max-fileis the alternative if an operator's collector reads the JSON files.docker logsworks with both./healthzout of the access log: inconfig/gunicorn_logging.py'sRedactingLogger, overrideaccess()to return early for aGET /healthzanswered 200 from loopback. A failing healthcheck (any other status) is still logged. gunicorn has no option for this, so the logger class already in place is the hook.What it saves or protects
medium: container logs on the host stop growing without bound (the idle worker alone writes about 86,400 lines a day today, see B1; the healthcheck 2,880 access lines a day on the web container)
Accessibility
none
Decided by the maintainer (2026-10-31)
compose: log driver local 10 MB x 3 in one shared anchor; successful /healthz left out of the access log
Decisions
localand 10 MB × 3; an operator with a central collector changes one anchor.docker inspect).Found by the efficiency and reliability audit of 2026-10-30 (finding D6; index postulo/postulo#1108). Checked against
mainatdaee30b15(2026-10-30).