set DB on sslmode=require on prod
This commit is contained in:
@@ -46,6 +46,8 @@ TELEGRAM_BOT_TOKEN = os.getenv('TG_BOT_TOKEN', '<tg token>')
|
||||
# Database settings
|
||||
# Only uncomment if default settings in base.py are not ok
|
||||
|
||||
DB_OPTIONS = {'sslmode': 'require'} if os.getenv('DB_SSL', False) == 'True' else {}
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
@@ -54,5 +56,6 @@ DATABASES = {
|
||||
'PASSWORD': os.getenv('DB_PASSWD', 'postgres'),
|
||||
'HOST': os.getenv('DB_HOST', 'localhost'),
|
||||
'PORT': os.getenv('DB_PORT', 5432),
|
||||
'OPTIONS': DB_OPTIONS,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user