Configure OSEM via environment variables

Instead of reading a yaml file we get configuration from the
environment.
This commit is contained in:
Henne Vogelsang 2016-03-22 18:14:40 +01:00
parent 45c31f210f
commit ebcb2780cd
17 changed files with 39 additions and 34 deletions

View file

@ -35,7 +35,10 @@ Osem::Application.configure do
config.eager_load = false
# Set the detault url for action mailer
config.action_mailer.default_url_options = { host: CONFIG['url_for_emails'] }
config.action_mailer.default_url_options = { host: (ENV['OSEM_HOSTNAME'] || 'localhost:3000') }
# Set the secret key base if it's not set via other means
config.secret_key_base ||= 'f4be765bc98e516de82ac01daa8f8aa11c5ca13cb6c911887851ac89457b6c0b056b2361a21b5c08926c9386e0f91eef84fc0b103d522bf00bc0c78ea8ce7c58'
# Use omniauth mock credentials
OmniAuth.config.test_mode = true