-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add rack-session gem (needed by rack 3) * update standalone code from https://github.com/sidekiq/sidekiq/wiki/Monitoring#standalone * fix sidekiq_web service in docker-compose.yml
- Loading branch information
Showing
4 changed files
with
17 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
require "sidekiq" | ||
require "sidekiq/web" | ||
require_relative "../config/initializers/sidekiq" | ||
|
||
SESSION_KEY = ".session.key" | ||
|
||
if !File.exist?(SESSION_KEY) | ||
require "securerandom" | ||
File.open(SESSION_KEY, "w") do |f| | ||
f.write(SecureRandom.hex(32)) | ||
end | ||
end | ||
# This is sidekiq_web.ru | ||
# Run with `bundle exec rackup sidekiq_web.ru` or similar. | ||
|
||
Services.redis_config[:size] = 1 | ||
|
||
use Rack::Session::Cookie, secret: File.read(SESSION_KEY), same_site: true, max_age: 86400 | ||
require "securerandom" | ||
require "rack/session" | ||
require "sidekiq/web" | ||
|
||
# In a multi-process deployment, all Web UI instances should share | ||
# this secret key so they can all decode the encrypted browser cookies | ||
# and provide a working session. | ||
# Rails does this in /config/initializers/secret_token.rb | ||
secret_key = SecureRandom.hex(32) | ||
use Rack::Session::Cookie, secret: secret_key, same_site: true, max_age: 86400 | ||
run Sidekiq::Web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters