Commit a28ebe9
Changed files (2)
config
environments
config/environments/production.rb
@@ -40,13 +40,13 @@ Urkel::Application.configure do
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
- # config.force_ssl = true
+ config.force_ssl = true
# Set to :debug to see everything in the log.
config.log_level = :info
# Prepend all log lines with the following tags.
- # config.log_tags = [ :subdomain, :uuid ]
+ config.log_tags = [ lambda { |x| Time.now.utc }, :host, :remote_ip, :uuid ]
# Use a different logger for distributed setups.
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
@@ -55,7 +55,7 @@ Urkel::Application.configure do
config.cache_store = :mem_cache_store
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
- # config.action_controller.asset_host = "http://assets.example.com"
+ config.action_controller.asset_host = ENV['ASSET_HOST']
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
@@ -64,6 +64,17 @@ Urkel::Application.configure do
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
+ config.action_mailer.asset_host = ENV.fetch('ASSET_HOST')
+ config.action_mailer.default_url_options = { :host => ENV.fetch('APPLICATION_DOMAIN') }
+ config.action_mailer.smtp_settings = {
+ :address => ENV.fetch('SMTP_HOST'),
+ :port => ENV.fetch('SMTP_PORT'),
+ :domain => ENV.fetch('SMTP_DOMAIN'),
+ :user_name => ENV.fetch('SMTP_USERNAME'),
+ :password => ENV.fetch('SMTP_PASSWORD'),
+ :authentication => :plain,
+ :enable_starttls_auto => true
+ }
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found).
.env.example
@@ -1,2 +1,9 @@
RACK_ENV=development
SECRET_KEY_BASE=development_secret
+ASSET_HOST=''
+APPLICATION_DOMAIN=''
+SMTP_HOST=''
+SMTP_PORT=''
+SMTP_DOMAIN=''
+SMTP_USERNAME=''
+SMTP_PASSWORD=''