about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/initializers/health_check.rb6
-rw-r--r--config/routes.rb2
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 26e5f3d09..b76b9f82e 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -9,6 +9,8 @@ Sidekiq::Web.set :session_secret, Rails.application.secrets[:secret_key_base]
 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