TwentyT
Twentyβ€’14mo ago
Taldres

PG_DATABASE_URL validation

Hey! I'm migrating from 0.31 to 0.32 and got some validation errors for PG_DATABASE_URL.

worker-1  | Error: An instance of EnvironmentVariables has failed the validation:
worker-1  |  - property PG_DATABASE_URL has failed the following constraints: isUrl
server-1  | Error: An instance of EnvironmentVariables has failed the validation:
server-1  |  - property PG_DATABASE_URL has failed the following constraints: isUrl 


I've defined all relevant env vars. Did I forget something?

.env
PG_DATABASE_HOST=db:5432
PGUSER_SUPERUSER=postgres
PGPASSWORD_SUPERUSER=removed


I use docker compose with the updated docker-compose.yml:
...
PG_DATABASE_URL: postgres://${PGUSER_SUPERUSER:-postgres}:${PGPASSWORD_SUPERUSER:-twenty}@${PG_DATABASE_HOST:-db:5432}/default
...
Was this page helpful?