Skip to content

Commit

Permalink
Merge branch '2455-feat/analysis-front-end' of https://github.com/SEE…
Browse files Browse the repository at this point in the history
…D-platform/seed into 2455-feat/analysis-front-end
  • Loading branch information
aviveiros11 committed Dec 15, 2020
2 parents 5459715 + fc887fb commit 78858ce
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions config/settings/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@
# Gather all the settings from the docker environment variables
ENV_VARS = ['POSTGRES_DB', 'POSTGRES_PORT', 'POSTGRES_USER', 'POSTGRES_PASSWORD', ]

# See the django docs for more info on these env vars:
# https://docs.djangoproject.com/en/3.0/topics/email/#smtp-backend
SMTP_ENV_VARS = ['EMAIL_HOST', 'EMAIL_PORT', 'EMAIL_HOST_USER',
'EMAIL_HOST_PASSWORD', 'EMAIL_USE_TLS', 'EMAIL_USE_SSL']

# The optional vars will set the SERVER_EMAIL information as needed
OPTIONAL_ENV_VARS = ['AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY', 'AWS_SES_REGION_NAME',
'AWS_SES_REGION_ENDPOINT', 'SERVER_EMAIL', 'SENTRY_JS_DSN', 'SENTRY_RAVEN_DSN',
'REDIS_PASSWORD']
'REDIS_PASSWORD', 'DJANGO_EMAIL_BACKEND'] + SMTP_ENV_VARS

for loc in ENV_VARS + OPTIONAL_ENV_VARS:
locals()[loc] = os.environ.get(loc)
Expand All @@ -37,7 +42,7 @@
# By default we are using SES as our email client. If you would like to use
# another backend (e.g. SMTP), then please update this model to support both and
# create a pull request.
EMAIL_BACKEND = 'django_ses.SESBackend'
EMAIL_BACKEND = (DJANGO_EMAIL_BACKEND if 'DJANGO_EMAIL_BACKEND' in os.environ else "django_ses.SESBackend")
DEFAULT_FROM_EMAIL = SERVER_EMAIL

# PostgreSQL DB config
Expand Down

0 comments on commit 78858ce

Please sign in to comment.