1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-12-22 23:04:21 +00:00

🔧 Allow database settings to be configured

This commit is contained in:
Steffo 2021-04-06 02:39:57 +02:00
parent 868ebea3cd
commit f74e87b645
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -79,9 +79,10 @@ WSGI_APPLICATION = 'sophon.wsgi.application'
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.postgresql', 'ENGINE': 'django.db.backends.postgresql',
'HOST': '', # Connect via UNIX socket (does not work on Windows) 'HOST': os.environ.get("DJANGO_DATABASE_HOST", ""), # Connect via UNIX socket (does not work on Windows)
'NAME': 'sophon', 'NAME': os.environ.get("DJANGO_DATABASE_NAME", "sophon"),
'USER': 'sophon', # Connect using its own user, isolating sophon from the rest of the server 'USER': os.environ.get("DJANGO_DATABASE_USER", "sophon"), # Connect using its own user, isolating sophon from the rest of the server
'PASSWORD': os.environ.get("DJANGO_DATABASE_PASSWORD", ""),
} }
} }