From 86dd316a46ce2a73c2ee47e62e8cfbd9b34e05c3 Mon Sep 17 00:00:00 2001 From: Maksym Komar Date: Fri, 12 Jun 2020 19:52:33 +0000 Subject: [PATCH] Add From: email setting to awsdeploy.yml --- app/app/settings.py | 1 + awsdeploy.yml | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/app/app/settings.py b/app/app/settings.py index 36233b8d..cb7303d7 100644 --- a/app/app/settings.py +++ b/app/app/settings.py @@ -314,6 +314,7 @@ EMAIL_HOST = env('EMAIL_HOST', None) EMAIL_HOST_USER = env('EMAIL_HOST_USER', None) EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD', None) EMAIL_PORT = env.int('EMAIL_PORT', 587) +DEFAULT_FROM_EMAIL = env('DEFAULT_FROM_EMAIL', 'webmaster@localhost') if not EMAIL_HOST: EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' diff --git a/awsdeploy.yml b/awsdeploy.yml index a94a73ea..e052944f 100644 --- a/awsdeploy.yml +++ b/awsdeploy.yml @@ -99,6 +99,10 @@ Resources: - !Ref WorkersCount - |+ + - sudo tee -a /env.list <<< DEFAULT_FROM_EMAIL= + - !Ref FromEmail + - |+ + - | sudo docker pull doccano/doccano:latest - | @@ -286,6 +290,11 @@ Parameters: MinLength: 1 MaxLength: 3 AllowedPattern: '^\d+$' + FromEmail: + Default: webmaster@localhost + Description: The email used to send from singup messages + Type: String + AllowedPattern: '^[\x20-\x45]?[\w-\+]+(\.[\w]+)*@[\w-]+(\.[\w]+)*(\.[a-z]{2,})?$' Outputs: PublicDNS: Value: !GetAtt