From 8276e028b7a3721beec361562bb65dfaf744279b Mon Sep 17 00:00:00 2001 From: Sebastian Silva Date: Mon, 7 Dec 2020 16:14:57 -0300 Subject: [PATCH] Added variables for SMTP (#8591) Okay I'm going to merge and hope that it will work in staging. --- config/environments/production.rb | 8 ++++++-- containers/docker-compose-production.yml | 6 ++++++ containers/docker-compose-stable.yml | 6 ++++++ containers/docker-compose-unstable.yml | 6 ++++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index a8415fef24..504618d172 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -67,8 +67,12 @@ config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { - :address => "smtp", - :port => 25, + :address => ENV["SMTP_HOST"] || "smtp", + :port => ENV["SMTP_PORT"] || 25, + :user_name => ENV["SMTP_USER"] || '', + :password => ENV["SMTP_PASS"] || '', + :authentication => ENV["SMTP_AUTH"] || '', + :enable_starttls_auto => ENV["SMTP_STLS"] || false } } # Enable threaded mode diff --git a/containers/docker-compose-production.yml b/containers/docker-compose-production.yml index d2895312b7..4069f0a990 100644 --- a/containers/docker-compose-production.yml +++ b/containers/docker-compose-production.yml @@ -32,6 +32,12 @@ services: - SERVER_ADDRESS=${SERVER_ADDRESS} - USERNAME=${USERNAME} - EMAIL_PASSWORD=${EMAIL_PASSWORD} + - SMTP_USER=${SMTP_USER} + - SMTP_PASS=${SMTP_PASS} + - SMTP_HOST=${SMTP_HOST} + - SMTP_PORT=${SMTP_PORT} + - SMTP_AUTH=${SMTP_AUTH} + - SMTP_STLS=${SMTP_STLS} - OAUTH_GOOGLE_APP_KEY=${OAUTH_GOOGLE_APP_KEY} - OAUTH_GOOGLE_APP_SECRET=${OAUTH_GOOGLE_APP_SECRET} - OAUTH_GITHUB_APP_KEY=${OAUTH_GITHUB_APP_KEY} diff --git a/containers/docker-compose-stable.yml b/containers/docker-compose-stable.yml index 4facb86dba..57273e00d9 100644 --- a/containers/docker-compose-stable.yml +++ b/containers/docker-compose-stable.yml @@ -32,6 +32,12 @@ services: - SERVER_ADDRESS=${SERVER_ADDRESS} - USERNAME=${USERNAME} - EMAIL_PASSWORD=${EMAIL_PASSWORD} + - SMTP_USER=${SMTP_USER} + - SMTP_PASS=${SMTP_PASS} + - SMTP_HOST=${SMTP_HOST} + - SMTP_PORT=${SMTP_PORT} + - SMTP_AUTH=${SMTP_AUTH} + - SMTP_STLS=${SMTP_STLS} - OAUTH_GOOGLE_APP_KEY=${OAUTH_GOOGLE_APP_KEY} - OAUTH_GOOGLE_APP_SECRET=${OAUTH_GOOGLE_APP_SECRET} - OAUTH_GITHUB_APP_KEY=${OAUTH_GITHUB_APP_KEY} diff --git a/containers/docker-compose-unstable.yml b/containers/docker-compose-unstable.yml index 412430eb13..7f27fdd5f4 100644 --- a/containers/docker-compose-unstable.yml +++ b/containers/docker-compose-unstable.yml @@ -32,6 +32,12 @@ services: - SERVER_ADDRESS=${SERVER_ADDRESS} - USERNAME=${USERNAME} - EMAIL_PASSWORD=${EMAIL_PASSWORD} + - SMTP_USER=${SMTP_USER} + - SMTP_PASS=${SMTP_PASS} + - SMTP_HOST=${SMTP_HOST} + - SMTP_PORT=${SMTP_PORT} + - SMTP_AUTH=${SMTP_AUTH} + - SMTP_STLS=${SMTP_STLS} - OAUTH_GOOGLE_APP_KEY=${OAUTH_GOOGLE_APP_KEY} - OAUTH_GOOGLE_APP_SECRET=${OAUTH_GOOGLE_APP_SECRET} - OAUTH_GITHUB_APP_KEY=${OAUTH_GITHUB_APP_KEY}