Skip to content

Commit

Permalink
Add options to overload redis and mailer hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
JaciBrunning committed Mar 12, 2020
1 parent 567ba4f commit 31b3b3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]

# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = ENV['CURTIN_COURSES_INSECURE'].present? ? false : true
config.force_ssl = ENV['NO_SSL'].present? ? false : true

# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
Expand Down Expand Up @@ -95,7 +95,7 @@
config.action_mailer.delivery_method = :smtp

config.action_mailer.smtp_settings = {
address: 'mailer',
address: ENV.fetch("MAILER_HOST") {'mailer'},
port: 587,
domain: 'imjac.in',
openssl_verify_mode: OpenSSL::SSL::VERIFY_NONE
Expand Down
4 changes: 2 additions & 2 deletions config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

unless Rails.env.development?
Sidekiq.configure_server do |cfg|
cfg.redis = { url: 'redis://redis:6379/1' }
cfg.redis = { url: ENV.fetch("REDIS_URL") {'redis://redis:6379/1'} }
end

Sidekiq.configure_client do |cfg|
cfg.redis = { url: 'redis://redis:6379/1' }
cfg.redis = { url: ENV.fetch("REDIS_URL") {'redis://redis:6379/1'} }
end

Sidekiq::Web.use(Rack::Auth::Basic) do |user, pass|
Expand Down

0 comments on commit 31b3b3e

Please sign in to comment.