diff --git a/config.ru b/config.ru index 9f97443..df1a597 100644 --- a/config.ru +++ b/config.ru @@ -15,4 +15,17 @@ use Rack::Cors do :headers => :any, :methods => [:get, :post, :put, :options] end +end + + +# Code to enable the sidekiq monitoring dashboard +# See also: production.rb + +require 'sidekiq/web' +map '/sidekiq' do + use Rack::Auth::Basic, "Protected Area" do |username, password| + username == 'sidekiq' && password == ENV["SIDEKIQ_DASHBOARD_PASSWORD"] + end + + run Sidekiq::Web end \ No newline at end of file diff --git a/config/environments/production.rb b/config/environments/production.rb index c197365..10d464e 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -4,16 +4,6 @@ config.redis = {size: 1} end -require 'sidekiq/web' -map '/sidekiq' do - use Rack::Auth::Basic, "Protected Area" do |username, password| - username == 'sidekiq' && password == ENV["SIDEKIQ_DASHBOARD_PASSWORD"] - end - - run Sidekiq::Web -end - - Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb.