diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2019-09-07 09:47:51 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-09-07 02:47:51 +0200 |
commit | d7268befa853ac4a99f9d066c38330d4fc0bfc31 (patch) | |
tree | 7ebc0784a706059880d471c3ae8664cf9beaa7dd /config | |
parent | e445a8af64908b2bdb721bec74c113e8258a129b (diff) |
Add healthcheck endpoint for web (#11770)
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/health_check.rb | 6 | ||||
-rw-r--r-- | config/routes.rb | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/config/initializers/health_check.rb b/config/initializers/health_check.rb new file mode 100644 index 000000000..eece67b10 --- /dev/null +++ b/config/initializers/health_check.rb @@ -0,0 +1,6 @@ +HealthCheck.setup do |config| + config.uri = 'health' + + config.standard_checks = %w(database migrations cache) + config.full_checks = %w(database migrations cache) +end diff --git a/config/routes.rb b/config/routes.rb index 74a162f32..fe8425341 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -10,6 +10,8 @@ Rails.application.routes.draw do mount LetterOpenerWeb::Engine, at: 'letter_opener' if Rails.env.development? + health_check_routes + authenticate :user, lambda { |u| u.admin? } do mount Sidekiq::Web, at: 'sidekiq', as: :sidekiq mount PgHero::Engine, at: 'pghero', as: :pghero |