Add example env and production initialization

main
Hugo Peixoto 4 months ago
parent bed4fee11b
commit 9f46baf52d
  1. 18
      config/environments/production.rb
  2. 14
      env.example

@ -57,6 +57,24 @@ Rails.application.configure do
# 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.smtp_settings = {
address: ENV['SMTP_ADDRESS'],
port: 587,
domain: ENV['SMTP_DOMAIN'],
user_name: ENV['SMTP_USERNAME'],
password: ENV['SMTP_PASSWORD'],
authentication: 'plain',
enable_starttls_auto: true,
}
config.action_mailer.default_url_options = {
host: ENV['BASE_HOST'],
}
config.action_mailer.default_url_options = {
host: ENV['BASE_HOST'],
}
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true

@ -0,0 +1,14 @@
DATABASE_URL=postgres://username:password@example.org/dbname
SMTP_ADDRESS=smtp.example.org
SMTP_DOMAIN=example.org
SMTP_USERNAME=username
SMTP_PASSWORD=password
SMTP_FROM_ADDRESS=example@example.org
SMTP_FROM_NAME=Example Name
IFTHENPAY_KEY=XXXX-XXXXXX
IFTHENPAY_ACCOUNTS=MBWAY|XXX-XXXXXX;XXXXX|XXX
BASE_HOST=example.org
RAILS_LOG_TO_STDOUT=true
RAILS_ENV=production
Loading…
Cancel
Save