Merge pull request #434 from angelnu/develop

Add DB_OPTIONS to enable DBs with SSL
This commit is contained in:
vabene1111 2021-02-23 20:55:23 +01:00 committed by GitHub
commit 28312774bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,7 @@ TIMEZONE=Europe/Berlin
# add only a database password if you want to run with the default postgres, otherwise change settings accordingly
DB_ENGINE=django.db.backends.postgresql
# DB_OPTIONS= {}
POSTGRES_HOST=db_recipes
POSTGRES_PORT=5432
POSTGRES_USER=djangouser

View File

@ -175,6 +175,7 @@ WSGI_APPLICATION = 'recipes.wsgi.application'
DATABASES = {
'default': {
'ENGINE': os.getenv('DB_ENGINE') if os.getenv('DB_ENGINE') else 'django.db.backends.sqlite3',
'OPTIONS': ast.literal_eval(os.getenv('DB_OPTIONS')) if os.getenv('DB_OPTIONS') else {},
'HOST': os.getenv('POSTGRES_HOST'),
'PORT': os.getenv('POSTGRES_PORT'),
'USER': os.getenv('POSTGRES_USER'),