Add Sidekiq, configure admin access to Web UI
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
4526c941b8
commit
35e2c8cd30
7
Gemfile
7
Gemfile
|
@ -21,15 +21,22 @@ gem 'jbuilder', '~> 2.7'
|
|||
# Reduces boot times through caching; required in config/boot.rb
|
||||
gem 'bootsnap', '>= 1.4.2', require: false
|
||||
|
||||
# Configuration
|
||||
gem 'dotenv-rails'
|
||||
|
||||
# Authentication
|
||||
gem 'warden'
|
||||
gem 'devise'
|
||||
gem 'devise_ldap_authenticatable'
|
||||
gem 'net-ldap'
|
||||
|
||||
# HTTP requests
|
||||
gem 'faraday'
|
||||
|
||||
# Background/scheduled jobs
|
||||
gem 'sidekiq'
|
||||
gem 'sidekiq-scheduler'
|
||||
|
||||
group :development, :test do
|
||||
# Use sqlite3 as the database for Active Record
|
||||
gem 'sqlite3', '~> 1.4'
|
||||
|
|
26
Gemfile.lock
26
Gemfile.lock
|
@ -73,6 +73,7 @@ GEM
|
|||
regexp_parser (~> 1.5)
|
||||
xpath (~> 3.2)
|
||||
concurrent-ruby (1.1.7)
|
||||
connection_pool (2.2.3)
|
||||
crack (0.4.3)
|
||||
safe_yaml (~> 1.0.0)
|
||||
crass (1.0.6)
|
||||
|
@ -91,7 +92,10 @@ GEM
|
|||
dotenv-rails (2.7.2)
|
||||
dotenv (= 2.7.2)
|
||||
railties (>= 3.2, < 6.1)
|
||||
e2mmap (0.1.0)
|
||||
erubi (1.9.0)
|
||||
et-orbi (1.2.4)
|
||||
tzinfo
|
||||
factory_bot (6.1.0)
|
||||
activesupport (>= 5.0.0)
|
||||
factory_bot_rails (6.1.0)
|
||||
|
@ -100,6 +104,9 @@ GEM
|
|||
faraday (0.17.0)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
ffi (1.13.1)
|
||||
fugit (1.4.2)
|
||||
et-orbi (~> 1.1, >= 1.1.8)
|
||||
raabro (~> 1.4)
|
||||
globalid (0.4.2)
|
||||
activesupport (>= 4.2.0)
|
||||
hashdiff (0.4.0)
|
||||
|
@ -141,6 +148,7 @@ GEM
|
|||
public_suffix (4.0.6)
|
||||
puma (4.3.6)
|
||||
nio4r (~> 2.0)
|
||||
raabro (1.4.0)
|
||||
rack (2.2.3)
|
||||
rack-proxy (0.6.5)
|
||||
rack
|
||||
|
@ -176,6 +184,7 @@ GEM
|
|||
rb-fsevent (0.10.4)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
redis (4.2.5)
|
||||
regexp_parser (1.8.2)
|
||||
responders (3.0.1)
|
||||
actionpack (>= 5.0)
|
||||
|
@ -197,6 +206,8 @@ GEM
|
|||
rspec-mocks (~> 3.9)
|
||||
rspec-support (~> 3.9)
|
||||
rspec-support (3.10.0)
|
||||
rufus-scheduler (3.7.0)
|
||||
fugit (~> 1.1, >= 1.1.6)
|
||||
safe_yaml (1.0.5)
|
||||
sass-rails (6.0.0)
|
||||
sassc-rails (~> 2.1, >= 2.1.1)
|
||||
|
@ -208,6 +219,17 @@ GEM
|
|||
sprockets (> 3.0)
|
||||
sprockets-rails
|
||||
tilt
|
||||
sidekiq (6.1.3)
|
||||
connection_pool (>= 2.2.2)
|
||||
rack (~> 2.0)
|
||||
redis (>= 4.2.0)
|
||||
sidekiq-scheduler (3.0.1)
|
||||
e2mmap
|
||||
redis (>= 3, < 5)
|
||||
rufus-scheduler (~> 3.2)
|
||||
sidekiq (>= 3)
|
||||
thwait
|
||||
tilt (>= 1.4.0)
|
||||
spring (2.1.1)
|
||||
spring-watcher-listen (2.0.1)
|
||||
listen (>= 2.7, < 4.0)
|
||||
|
@ -222,6 +244,8 @@ GEM
|
|||
sqlite3 (1.4.2)
|
||||
thor (1.0.1)
|
||||
thread_safe (0.3.6)
|
||||
thwait (0.2.0)
|
||||
e2mmap
|
||||
tilt (2.0.10)
|
||||
turbolinks (5.2.1)
|
||||
turbolinks-source (~> 5.2)
|
||||
|
@ -274,6 +298,8 @@ DEPENDENCIES
|
|||
rails (~> 6.0.3, >= 6.0.3.4)
|
||||
rspec-rails
|
||||
sass-rails (>= 6)
|
||||
sidekiq
|
||||
sidekiq-scheduler
|
||||
spring
|
||||
spring-watcher-listen (~> 2.0.0)
|
||||
sqlite3 (~> 1.4)
|
||||
|
|
|
@ -39,5 +39,7 @@ module Akkounts
|
|||
g.fixture_replacement :factory_bot, suffix_factory: 'factory', dir: 'spec/factories'
|
||||
g.stylesheets false
|
||||
end
|
||||
|
||||
config.active_job.queue_adapter = :sidekiq
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require 'sidekiq/web'
|
||||
|
||||
Rails.application.routes.draw do
|
||||
resources :donations
|
||||
devise_for :users
|
||||
|
@ -23,6 +25,10 @@ Rails.application.routes.draw do
|
|||
resources :donations
|
||||
end
|
||||
|
||||
authenticate :user, ->(user) { user.is_admin? } do
|
||||
mount Sidekiq::Web => '/sidekiq'
|
||||
end
|
||||
|
||||
# Letter Opener (open "sent" emails in dev and staging)
|
||||
if Rails.env.match(/staging|development/)
|
||||
mount LetterOpenerWeb::Engine, at: "letter_opener"
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
:concurrency: 2
|
||||
:queues:
|
||||
- default
|
Loading…
Reference in New Issue