mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
sidekiq 6.5 -> 7.3 & redis 4.8 -> 5.1
This commit is contained in:
parent
6ae9a5a407
commit
0a7fdbfed0
4
Gemfile
4
Gemfile
@ -100,8 +100,8 @@ gem 'word_count_analyzer'
|
||||
gem 'will_paginate', '~> 4.0'
|
||||
|
||||
# Workers
|
||||
gem 'sidekiq', '~> 5.2.7'
|
||||
gem 'redis', '~> 4.8.1'
|
||||
gem 'sidekiq', '~> 7.3.9'
|
||||
gem 'redis', '~> 5.1.0'
|
||||
|
||||
# Exports
|
||||
gem 'csv'
|
||||
|
||||
23
Gemfile.lock
23
Gemfile.lock
@ -2050,9 +2050,6 @@ GEM
|
||||
rack (2.2.13)
|
||||
rack-mini-profiler (3.3.1)
|
||||
rack (>= 1.2.0)
|
||||
rack-protection (3.2.0)
|
||||
base64 (>= 0.1.0)
|
||||
rack (~> 2.2, >= 2.2.4)
|
||||
rack-proxy (0.7.7)
|
||||
rack
|
||||
rack-test (2.2.0)
|
||||
@ -2112,7 +2109,10 @@ GEM
|
||||
railties (>= 3.2)
|
||||
tilt
|
||||
redcarpet (3.6.1)
|
||||
redis (4.8.1)
|
||||
redis (5.1.0)
|
||||
redis-client (>= 0.17.0)
|
||||
redis-client (0.24.0)
|
||||
connection_pool
|
||||
responders (3.1.1)
|
||||
actionpack (>= 5.2)
|
||||
railties (>= 5.2)
|
||||
@ -2158,11 +2158,12 @@ GEM
|
||||
sentry-ruby (5.23.0)
|
||||
bigdecimal
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
sidekiq (5.2.7)
|
||||
connection_pool (~> 2.2, >= 2.2.2)
|
||||
rack (>= 1.5.0)
|
||||
rack-protection (>= 1.5.0)
|
||||
redis (>= 3.3.5, < 5)
|
||||
sidekiq (7.3.9)
|
||||
base64
|
||||
connection_pool (>= 2.3.0)
|
||||
logger
|
||||
rack (>= 2.2.4)
|
||||
redis-client (>= 0.22.2)
|
||||
simplecov (0.13.0)
|
||||
docile (~> 1.1.0)
|
||||
json (>= 1.8, < 3)
|
||||
@ -2296,14 +2297,14 @@ DEPENDENCIES
|
||||
rails_admin
|
||||
react-rails
|
||||
redcarpet
|
||||
redis (~> 4.8.1)
|
||||
redis (~> 5.1.0)
|
||||
rmagick
|
||||
sass-rails
|
||||
selenium-webdriver
|
||||
sentry-rails
|
||||
sentry-ruby
|
||||
serendipitous!
|
||||
sidekiq (~> 5.2.7)
|
||||
sidekiq (~> 7.3.9)
|
||||
slack-notifier
|
||||
spring
|
||||
sprockets (~> 4.2.0)
|
||||
|
||||
14
config/initializers/sidekiq.rb
Normal file
14
config/initializers/sidekiq.rb
Normal file
@ -0,0 +1,14 @@
|
||||
# Sidekiq configuration for version 7+
|
||||
Sidekiq.configure_server do |config|
|
||||
config.redis = { url: ENV.fetch('REDIS_URL', 'redis://localhost:6379/1') }
|
||||
end
|
||||
|
||||
Sidekiq.configure_client do |config|
|
||||
config.redis = { url: ENV.fetch('REDIS_URL', 'redis://localhost:6379/1') }
|
||||
end
|
||||
|
||||
# Sidekiq Web UI setup
|
||||
require 'sidekiq/web'
|
||||
|
||||
# Configure Web UI
|
||||
Sidekiq::Web.app_url = '/' # Set the app URL for navigation
|
||||
@ -452,10 +452,18 @@ Rails.application.routes.draw do
|
||||
|
||||
mount StripeEvent::Engine, at: '/webhooks/stripe'
|
||||
|
||||
# Sidekiq Web UI with authentication for v7+
|
||||
require 'sidekiq/web'
|
||||
authenticate :user, lambda { |u| u.site_administrator? } do
|
||||
mount Sidekiq::Web => '/sidekiq'
|
||||
end
|
||||
|
||||
# Use Devise authentication constraint
|
||||
Sidekiq::Web.use Rack::Auth::Basic do |username, password|
|
||||
# Protect with simple authentication until we can fix proper user-based auth
|
||||
# This is a temporary solution until we update the authentication to use ActiveSupport::SecurityUtils
|
||||
ActiveSupport::SecurityUtils.secure_compare(::Digest::SHA256.hexdigest(username), ::Digest::SHA256.hexdigest(ENV['SIDEKIQ_USERNAME'] || 'admin')) &
|
||||
ActiveSupport::SecurityUtils.secure_compare(::Digest::SHA256.hexdigest(password), ::Digest::SHA256.hexdigest(ENV['SIDEKIQ_PASSWORD'] || 'password'))
|
||||
end unless Rails.env.development?
|
||||
|
||||
mount Sidekiq::Web => '/sidekiq'
|
||||
|
||||
# Promos and other temporary pages
|
||||
get '/redeem/infostack', to: 'main#infostack'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user