docker-compose.yml: add PALIAD_EXPORT_DIR env declaration + volume mount for Backup Mode #105
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
cronus's #77 Slice A Backup Mode (commit
99c9d89/ merged at51fca93) introduced thePALIAD_EXPORT_DIRenv var. Unset →/admin/backupsreturns 503. paliad's docker-compose.yml needs the env declaration (Dokploy interpolates from its secret store) + a volume mount so backups persist across container restarts.What to do
docker-compose.yml(root ofm/paliad):services.web.environment:addPALIAD_EXPORT_DIR: ${PALIAD_EXPORT_DIR:-/var/lib/paliad/exports}so the container inherits the var when Dokploy provides it AND falls back to a sensible default. (Per project CLAUDE.md trap: env vars must be declared in compose, not just in Dokploy's env block.)services.web.volumes:add a named volume mount:- paliad_exports:/var/lib/paliad/exportsvolumes:declarepaliad_exports:(default driver, persistent).docker compose configlocally if possible (or visually scan for indentation correctness).PALIAD_EXPORT_DIR=/var/lib/paliad/exportsin Dokploy's env panel for the service to ensure the var is non-empty (or rely on the compose default${PALIAD_EXPORT_DIR:-/var/lib/paliad/exports})./admin/backupsno longer returns 503 + the 'Backup jetzt erstellen' button writes to the volume.Hard rules
${PALIAD_EXPORT_DIR:-/var/lib/paliad/exports}interpolation is intentional — Dokploy may not have the env set at deploy time; the compose default keeps it working.go build ./... && go test ./internal/... && cd frontend && bun run buildclean (no code change, but verify the smoke test still passes).mai/<worker>/dokploy-export-dir-env.Out of scope
Reporting
mai report completedwith branch + SHAs + verification: paliad.de redeployed,curl -I https://paliad.de/admin/backups(via authenticated admin session) does NOT return 503, and a test backup write succeeds against /var/lib/paliad/exports.Done — compose patched on
mai/artemis/coder-docker-compose-yml.What changed
Surgical edit to
docker-compose.yml(root ofm/paliad):Note on style: the existing env block uses list-style
- KEY=${VALUE}(not map-styleKEY: ${VALUE}as the issue body sketched). Kept the list form to match the rest of the file — the resolved value is identical (docker compose configconfirmsPALIAD_EXPORT_DIR: /var/lib/paliad/exports).Verification
docker compose configresolves cleanly. Env:PALIAD_EXPORT_DIR: /var/lib/paliad/exports. Volume mount + top-levelpaliad_exports:named volume both parse.go build ./...— clean.go test ./internal/...— clean (all packages pass / cached).cd frontend && bun run build— clean (2862 i18n keys unchanged).Commit
3700d68c68Next step (m's hands)
This branch lives on its own and won't auto-deploy until merged to
main. Oncemainpicks up the change, Dokploy redeploys with the new volume + env. After redeploy:PALIAD_EXPORT_DIR=/var/lib/paliad/exportsexplicitly in Dokploy's env panel (the compose default already covers it, but explicit is nicer for the Dokploy UI).curl -I https://paliad.de/admin/backupsvia authenticated admin session — should no longer return 503./var/lib/paliad/exportsinside the container (docker exec <web> ls /var/lib/paliad/exports).I can't run those final smoke tests from the worktree — they need the production deploy + an admin-cookie'd request. Setting
needs-reviewrather thandoneuntil paliad.de is redeployed and the admin-side checks pass.