Get the postgres password from the env variable

This commit is contained in:
Andreas Zweili 2022-12-12 10:07:58 +01:00
parent 0a669d7e88
commit 12e72e2698
2 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,7 @@ services:
- DJANGO_SETTINGS_MODULE
- DJANGO_DEBUG
- DJANGO_SECRET_KEY
- "DJANGO_POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
depends_on:
- db

View File

@ -26,6 +26,7 @@ DATABASES = {
"ENGINE": "django.db.backends.postgresql",
"NAME": "postgres",
"USER": "postgres",
"PASSWORD": os.environ.get("DJANGO_POSTGRES_PASSWORD"),
"HOST": "db",
"PORT": 5432,
}