fix: restore-db.sh connects as the container's Coolify superuser, not "postgres" #71
No reviewers
Labels
No labels
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-triage
ready
release
scope:apply
scope:capture
scope:coolify-api
scope:fleet
scope:manifest
scope:secrets
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/cast#71
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/restore-db-superuser"
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
restore-db.shhardcodedpsql -U postgres. Coolify provisions each Postgres resource with a randomPOSTGRES_USER, so thepostgresrole doesn't exist and the restore dies withFATAL: role "postgres" does not exist.Fix: expand
$POSTGRES_USERinside the container (single-quotedsh -c), so the restore connects as the resource's own superuser. No credential is hardcoded; works for any Coolify Postgres.How found
The Task 9 restore drill against box B — the first probe (
psql -U postgres) failed exactly this way. See heavy-duty/infra#25.Verify
bash -n+shellcheckclean.$POSTGRES_USERstays literal client-side and expands in-container;<db>expands client-side (unchanged behavior).🤖 Generated with Claude Code