♻️ Migrate to DATABASE_URL instead of separate variables (#2184)

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
Patrick Arminio
2026-08-11 18:28:34 +01:00
committed by GitHub
parent cf1548a983
commit 32ab6dd022
6 changed files with 18 additions and 31 deletions
+3 -7
View File
@@ -20,7 +20,7 @@ services:
db:
image: postgres:18
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
test: ["CMD-SHELL", "pg_isready -U postgres -d app"]
interval: 10s
retries: 5
start_period: 30s
@@ -29,8 +29,7 @@ services:
- app-db-data:/var/lib/postgresql
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?Variable not set}
- POSTGRES_USER=${POSTGRES_USER:?Variable not set}
- POSTGRES_DB=${POSTGRES_DB:?Variable not set}
- POSTGRES_DB=app
adminer:
image: adminer
@@ -62,10 +61,7 @@ services:
SMTP_USER: ${SMTP_USER:-}
SMTP_PASSWORD: ${SMTP_PASSWORD:-}
EMAILS_FROM_EMAIL: ${EMAILS_FROM_EMAIL}
POSTGRES_SERVER: db
POSTGRES_DB: ${POSTGRES_DB:?Variable not set}
POSTGRES_USER: ${POSTGRES_USER:?Variable not set}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Variable not set}
DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD:?Variable not set}@db:5432/app
SENTRY_DSN: ${SENTRY_DSN:-}
healthcheck: