Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-05-13 00:39:03 +0300
committerDouwe Maan <douwe@selenight.nl>2016-05-13 00:39:03 +0300
commit7fc51d1908a1ce7b0a09f273881c08102efd1dae (patch)
treeec761b8751c914c8eee39912537bbcbebd09d273 /config
parent74c69709dc19dbaf56c226b5a7955f229af10f4f (diff)
parentad77ab0376fabf3dfadea86c716358964b526956 (diff)
Merge branch 'health-check-route'
# Conflicts: # db/schema.rb
Diffstat (limited to 'config')
-rw-r--r--config/initializers/health_check.rb3
-rw-r--r--config/routes.rb5
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