Merge branch 'develop' into 'master'
This commit is contained in:
@@ -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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user