Fix: get database config from env

This commit is contained in:
Aroy-Art 2025-04-01 22:08:19 +02:00
parent a352a1f752
commit 4d5e661767
Signed by: Aroy
GPG key ID: 583642324A1D2070

View file

@ -101,11 +101,12 @@ WSGI_APPLICATION = "core.wsgi.application"
DATABASES = { DATABASES = {
"default": { "default": {
"ENGINE": "django.db.backends.postgresql", "ENGINE": "django.db.backends.postgresql",
"NAME": "archivist", "NAME": os.environ.get("DB_NAME", "archivist"),
"USER": "archivist", "USER": os.environ.get("DB_USER", "archivist"),
"PASSWORD": "password", "PASSWORD": os.environ.get("DB_PASSWORD", "password"),
"HOST": "localhost", # or the service name in your docker-compose.yml # or the service name in your docker-compose.
"PORT": "5432", "HOST": os.environ.get("DB_HOST", "localhost"),
"PORT": os.environ.get("DB_PORT", "5432"),
} }
# "default": { # "default": {
# "ENGINE": "django.db.backends.sqlite3", # "ENGINE": "django.db.backends.sqlite3",