Container hardening: non-root user, app healthcheck, localhost bind default, DSN password encoding #64
Labels
No labels
area:ai
area:ci-cd
area:notifications
area:observability
area:public-pages
backlog
bug
duplicate
enhancement
help wanted
invalid
question
type:decision
type:feature
type:infra
type:maintenance
type:security
v1.0.1
v1.1.0
v1.2.0
v1.3.0
v2.0.0
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/WeatherBot#64
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?
USER; run as a non-root user, chown radar_cache /matrix_store.
/health(db already has one; CD alreadycurls it — cd.yml:74-75).
127.0.0.1:${APP_PORT:-8000}:8000and documentthe reverse-proxy/override expectation (session security assumes HTTPS in
front).
DATABASE_URLinterpolates${POSTGRES_PASSWORD}unencoded(docker-compose.yml:12); URL-encode in an entrypoint or document the
restricted charset in .env.example — README says "any strong password",
which breaks on
@:/%.docker:pinDigests; add conservative mem limits.Acceptance criteria:
docker compose psshows app health@-containing password connectsFiled from the 2026-07-17 codebase audit (
docs/.internal/report-2026-07-17.md), finding F-25.Done in #95 (merged to
main). App now runs as non-root (UID 10001) via agosuentrypoint that chowns the mounted cache volumes and assemblesDATABASE_URLfromPOSTGRES_*components with a URL-encoded password (explicitDATABASE_URLstill wins). Added Dockerfile + compose healthchecks on/health, a loopback-by-default port bind (APP_BIND=0.0.0.0to expose), and a configurablemem_limit(default 1g). Verified on the dev server: PID 1 = uvicorn running as UID 10001, a special-char DB password round-trips through the encoded DSN, migrations run,/health200. SetAPP_BIND=0.0.0.0in the dev.envso the dev deploy stays reachable after the loopback default.