fix(infra): rename pgweb DATABASE_URL to PGWEB_DATABASE_URL
CI / commits (pull_request) Successful in 1m23s
CI / check (pull_request) Successful in 1m30s
CI / scan (pull_request) Successful in 1m33s
CI / a11y (pull_request) Successful in 1m24s
CI / perf (pull_request) Successful in 2m55s

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.
This commit is contained in:
Julien Gautier
2026-05-08 22:54:48 +02:00
parent a93b1067e6
commit ddddbc592b
+4 -1
View File
@@ -103,7 +103,10 @@ services:
restart: unless-stopped restart: unless-stopped
profiles: [dbtools] profiles: [dbtools]
environment: environment:
DATABASE_URL: postgres://${POSTGRES_USER:-portal}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-portal_dev}?sslmode=disable # `PGWEB_DATABASE_URL` (formerly `DATABASE_URL`) — pgweb 0.16
# deprecated the old name, ignores it, and starts up empty,
# crashing with "Invalid URL".
PGWEB_DATABASE_URL: postgres://${POSTGRES_USER:-portal}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-portal_dev}?sslmode=disable
ports: ports:
- '${PGWEB_PORT:-8081}:8081' - '${PGWEB_PORT:-8081}:8081'
depends_on: depends_on: