Add example env and production initialization

This commit is contained in:
Hugo Peixoto 2022-07-16 16:17:04 +01:00
parent bed4fee11b
commit 9f46baf52d
2 changed files with 32 additions and 0 deletions

View File

@ -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

14
env.example Normal file
View File

@ -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