fix(infra): rename pgweb DATABASE_URL to PGWEB_DATABASE_URL #62
Reference in New Issue
Block a user
Delete Branch "fix/infra/pgweb-env-var"
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?
Summary
pgweb 0.16 deprecated
DATABASE_URLin favour ofPGWEB_DATABASE_URL. With the old name, the container starts up, emits a[DEPRECATION]warning, then crashes:— because the new code path reads
PGWEB_DATABASE_URL(empty) and the URL parser rejects an empty string.Rename the env key in the compose file. Same value, just the new name.
Test plan
docker compose -f infra/local/dev.compose.yml --profile dbtools up -d→ pgweb stays running (not inRestartingloop).auditschema and the fouraudit_*roles to confirm DB connection.pgweb 0.16 deprecated `DATABASE_URL` in favour of `PGWEB_DATABASE_URL`. With the old name, the container starts up, emits a `[DEPRECATION]` warning, then crashes: Error: Invalid URL. Valid format: postgres://user:password@host:port/db?sslmode=mode — because the new code path reads `PGWEB_DATABASE_URL` (empty) and the URL parser rejects an empty string. Rename the env key in the compose file. Same value, just the new name.