Commit 67dc3b9c authored by DJ Mountney's avatar DJ Mountney

Add the health_check gem end expose the health_check route

parent 98d8e3fe
......@@ -333,3 +333,6 @@ gem 'oauth2', '~> 1.0.0'
# Soft deletion
gem "paranoia", "~> 2.0"
# Health check
gem 'health_check', '~> 1.5.1'
......@@ -402,6 +402,8 @@ GEM
html2haml (>= 1.0.1)
railties (>= 4.0.1)
hashie (3.4.3)
health_check (1.5.1)
rails (>= 2.3.0)
highline (1.7.8)
hipchat (1.5.2)
httparty
......@@ -947,6 +949,7 @@ DEPENDENCIES
grape (~> 0.13.0)
grape-entity (~> 0.4.2)
haml-rails (~> 0.9.0)
health_check (~> 1.5.1)
hipchat (~> 1.5.0)
html-pipeline (~> 1.11.0)
httparty (~> 0.13.3)
......
# HealthCheck.setup do |config|
# # Text output upon success
# config.success = 'success'
#
# # Timeout in seconds used when checking smtp server
# config.smtp_timeout = 30.0
#
# # http status code used when plain text error message is output
# # Set to 200 if you want your want to distinguish between partial (text does not include success) and
# # total failure of rails application (http status of 500 etc)
# config.http_status_for_error_text = 500
#
# # http status code used when an error object is output (json or xml)
# # Set to 200 if you want your want to distinguish between partial (healthy property == false) and
# # total failure of rails application (http status of 500 etc)
# config.http_status_for_error_object = 500
#
# # You can customize which checks happen on a standard health check
# config.standard_checks = [ 'database', 'migrations', 'custom' ]
#
# # You can set what tests are run with the 'full' or 'all' parameter
# config.full_checks = ['database', 'migrations', 'custom', 'email', 'cache']
#
# # Add one or more custom checks that return a blank string if ok, or an error message if there is an error
# config.add_custom_check do
# any code that returns blank on success and non blank string upon failure
# end
# end
......@@ -73,6 +73,9 @@ Rails.application.routes.draw do
mount Sidekiq::Web, at: '/admin/sidekiq', as: :sidekiq
end
# Health check
health_check_routes
# Enable Grack support
mount Grack::AuthSpawner, at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) }, via: [:get, :post, :put]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment