Merge pull request #2702 from AndrewKvalheim/omit-nil-smtp-settings
Allow leaving OSEM_SMTP_DOMAIN unset
This commit is contained in:
commit
30c2db682e
2 changed files with 2 additions and 2 deletions
|
|
@ -97,7 +97,7 @@ Osem::Application.configure do
|
||||||
domain: ENV['OSEM_SMTP_DOMAIN'],
|
domain: ENV['OSEM_SMTP_DOMAIN'],
|
||||||
enable_starttls_auto: ENV['OSEM_SMTP_ENABLE_STARTTLS_AUTO'],
|
enable_starttls_auto: ENV['OSEM_SMTP_ENABLE_STARTTLS_AUTO'],
|
||||||
openssl_verify_mode: ENV['OSEM_SMTP_OPENSSL_VERIFY_MODE']
|
openssl_verify_mode: ENV['OSEM_SMTP_OPENSSL_VERIFY_MODE']
|
||||||
}
|
}.compact
|
||||||
|
|
||||||
# Set the secret_key_base from the env, if not set by any other means
|
# Set the secret_key_base from the env, if not set by any other means
|
||||||
config.secret_key_base ||= ENV["SECRET_KEY_BASE"]
|
config.secret_key_base ||= ENV["SECRET_KEY_BASE"]
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ namespace :data do
|
||||||
dot_env.puts "OSEM_SMTP_USERNAME=\"#{CONFIG['mail_username']}\""
|
dot_env.puts "OSEM_SMTP_USERNAME=\"#{CONFIG['mail_username']}\""
|
||||||
dot_env.puts "OSEM_SMTP_PASSWORD=\"#{CONFIG['mail_password']}\""
|
dot_env.puts "OSEM_SMTP_PASSWORD=\"#{CONFIG['mail_password']}\""
|
||||||
dot_env.puts "OSEM_SMTP_AUTHENTICATION=\"#{CONFIG['mail_authentication']}\""
|
dot_env.puts "OSEM_SMTP_AUTHENTICATION=\"#{CONFIG['mail_authentication']}\""
|
||||||
dot_env.puts 'OSEM_SMTP_DOMAIN=""'
|
dot_env.puts '# OSEM_SMTP_DOMAIN="example.com"'
|
||||||
dot_env.close
|
dot_env.close
|
||||||
|
|
||||||
puts "Migrated config/config.yml to .env.#{Rails.env}"
|
puts "Migrated config/config.yml to .env.#{Rails.env}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue