Merge branch 'develop' into 'master'

This commit is contained in:
Aarni Halinen
2021-05-16 18:43:23 +03:00
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -46,6 +46,8 @@ TELEGRAM_BOT_TOKEN = os.getenv('TG_BOT_TOKEN', '<tg token>')
# Database settings # Database settings
# Only uncomment if default settings in base.py are not ok # Only uncomment if default settings in base.py are not ok
DB_OPTIONS = {'sslmode': 'require'} if os.getenv('DB_SSL', False) == 'True' else {}
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', 'ENGINE': 'django.db.backends.postgresql_psycopg2',
@@ -54,5 +56,6 @@ DATABASES = {
'PASSWORD': os.getenv('DB_PASSWD', 'postgres'), 'PASSWORD': os.getenv('DB_PASSWD', 'postgres'),
'HOST': os.getenv('DB_HOST', 'localhost'), 'HOST': os.getenv('DB_HOST', 'localhost'),
'PORT': os.getenv('DB_PORT', 5432), 'PORT': os.getenv('DB_PORT', 5432),
'OPTIONS': DB_OPTIONS,
} }
} }
+1
View File
@@ -28,6 +28,7 @@ services:
- DB_USER=sik - DB_USER=sik
- DB_HOST=managed-db.postgres.database.azure.com - DB_HOST=managed-db.postgres.database.azure.com
- DB_PORT=5432 - DB_PORT=5432
- DB_SSL=True
- SECRET_KEY_FILE=/run/secrets/BACKEND_SECRET_KEY - SECRET_KEY_FILE=/run/secrets/BACKEND_SECRET_KEY
- TG_BOT_TOKEN_FILE=/run/secrets/BACKEND_TG_BOT_TOKEN - TG_BOT_TOKEN_FILE=/run/secrets/BACKEND_TG_BOT_TOKEN
- DB_PASSWD_FILE=/run/secrets/BACKEND_DB_PASSWD - DB_PASSWD_FILE=/run/secrets/BACKEND_DB_PASSWD