Skip to content

Commit b153937

Browse files
Merge pull request #168 from DiputacioBarcelona/protect_sidekiq
Protect sidekiq
2 parents 4e1e2f6 + 1975793 commit b153937

2 files changed

Lines changed: 24 additions & 4 deletions

File tree

.dockerignore

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Ignore bundler config.
22
/.bundle
33

4-
# Ignore all logfiles and tempfiles.
4+
# Ignore all logfiles and tempfiles, including those nested inside the engines.
55
/log/*
66
/tmp/*
7-
!/log/.keep
8-
!/tmp/.keep
7+
**/log/*
8+
**/tmp/*
99

1010
# Ignore Byebug command history file.
1111
.byebug_history
@@ -24,3 +24,21 @@ public/uploads
2424
**/*.rspec-failures
2525
vendor/bundle
2626
.git
27+
28+
# Node dependencies: reinstalled inside the image by `npm install`.
29+
node_modules
30+
**/node_modules
31+
32+
# Dummy apps generated by the engines' specs. Git-ignored, ~3.8 GB, and pulled
33+
# into the image by the `ADD decidim-* decidim-*` lines in Dockerfile.production.
34+
decidim-*/spec/decidim_dummy_app
35+
36+
# Asset builds: regenerated by `bin/rake assets:precompile` (see
37+
# config/shakapacker.yml). packs-test is test-only and never needed in the image.
38+
/public/packs-test
39+
/public/decidim-packs
40+
/storage
41+
42+
# Keep the placeholder files the broader rules above would otherwise drop.
43+
!/log/.keep
44+
!/tmp/.keep

config/routes.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.application.config.action_mailer.delivery_method == :letter_opener_web
1212

13-
mount Sidekiq::Web => "/sidekiq"
13+
authenticate :user, ->(u) { u.admin? } do
14+
mount Sidekiq::Web => "/sidekiq"
15+
end
1416

1517
resource :system_status, only: :show
1618
resource :newsletter_settings, only: :show

0 commit comments

Comments
 (0)