Commit d5241b88 authored by Tanner Prestegard's avatar Tanner Prestegard

Get ALERT_EMAIL_FROM from envvars for container deployment

parent 83d6c04d
......@@ -83,6 +83,7 @@ RUN DJANGO_SETTINGS_MODULE=${SETTINGS_MODULE} \
DJANGO_DB_PASSWORD=fake_password \
DJANGO_SECRET_KEY=fake_key \
DJANGO_PRIMARY_FQDN=fake_fqdn \
DJANGO_ALERT_EMAIL_FROM=fake_email \
LVALERT_USER=fake_user \
LVALERT_PASSWORD=fake_password \
LVALERT_SERVER=fake_server \
......
......@@ -62,6 +62,10 @@ EMAIL_USE_TLS = True
EMAIL_HOST = os.environ.get('SMTP_HOST', 'localhost')
EMAIL_HOST_USER = os.environ.get('SMTP_USERNAME', '')
EMAIL_HOST_PASSWORD = os.environ.get('SMTP_PASSWORD', '')
ALERT_EMAIL_FROM = os.environ.get('DJANGO_ALERT_EMAIL_FROM', None)
if ALERT_EMAIL_FROM is None:
raise ImproperlyConfigured(
"Could not get 'alert from email' from envvars.")
# Database settings -----------------------------------------------------------
DATABASES = {
......@@ -106,7 +110,6 @@ ALLOWED_HOSTS += [SERVER_FQDN]
# Email settings - dependent on server hostname and FQDN ----------------------
SERVER_EMAIL = 'GraceDB <gracedb@{fqdn}>'.format(fqdn=SERVER_FQDN)
ALERT_EMAIL_FROM = SERVER_EMAIL
ALERT_EMAIL_TO = []
ALERT_EMAIL_BCC = []
ALERT_TEST_EMAIL_FROM = SERVER_EMAIL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment