diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-05-12 16:39:03 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-05-12 16:39:03 -0500 |
commit | 7fc51d1908a1ce7b0a09f273881c08102efd1dae (patch) | |
tree | ec761b8751c914c8eee39912537bbcbebd09d273 /config | |
parent | 74c69709dc19dbaf56c226b5a7955f229af10f4f (diff) | |
parent | ad77ab0376fabf3dfadea86c716358964b526956 (diff) | |
download | gitlab-ce-7fc51d1908a1ce7b0a09f273881c08102efd1dae.tar.gz |
Merge branch 'health-check-route'
# Conflicts:
# db/schema.rb
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/health_check.rb | 3 | ||||
-rw-r--r-- | config/routes.rb | 5 |
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 00000000000..79e2d23ab2e --- /dev/null +++ b/config/initializers/health_check.rb @@ -0,0 +1,3 @@ +HealthCheck.setup do |config| + config.standard_checks = ['database', 'migrations', 'cache'] +end diff --git a/config/routes.rb b/config/routes.rb index dd946305181..ec876eba345 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -73,6 +73,9 @@ Rails.application.routes.draw do mount Sidekiq::Web, at: '/admin/sidekiq', as: :sidekiq end + # Health check + get 'health_check(/:checks)' => 'health_check#index', as: :health_check + # Enable Grack support mount Grack::AuthSpawner, at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) }, via: [:get, :post, :put] @@ -254,6 +257,7 @@ Rails.application.routes.draw do end resource :logs, only: [:show] + resource :health_check, controller: 'health_check', only: [:show] resource :background_jobs, controller: 'background_jobs', only: [:show] resources :namespaces, path: '/projects', constraints: { id: /[a-zA-Z.0-9_\-]+/ }, only: [] do @@ -285,6 +289,7 @@ Rails.application.routes.draw do resource :application_settings, only: [:show, :update] do resources :services put :reset_runners_token + put :reset_health_check_token put :clear_repository_check_states end |