diff --git a/config/routes.rb b/config/routes.rb index 8f7a1db47..40ad98333 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -9,6 +9,8 @@ Rails.application.routes.draw do get "confirmations/reset", to: "auth/passwords#reset_confirmation" end + get "/health", to: ->(_) { [204, {}, [nil]] } + # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html ActiveAdmin.routes(self) diff --git a/manifest.yml b/manifest.yml index afabbb4f7..8938a313c 100644 --- a/manifest.yml +++ b/manifest.yml @@ -7,6 +7,8 @@ defaults: &defaults command: bundle exec rake cf:on_first_instance db:migrate && bin/rails server instances: 2 memory: 512M + health-check-type: http + health-check-http-endpoint: /health applications: - name: dluhc-core-staging diff --git a/spec/features/test_spec.rb b/spec/features/test_spec.rb index 13e42dee1..556d72a52 100644 --- a/spec/features/test_spec.rb +++ b/spec/features/test_spec.rb @@ -4,4 +4,9 @@ RSpec.describe "Test Features" do visit("/") expect(page).to have_content("Submit social housing lettings and sales data (CORE)") end + + it "Responds to a health check" do + visit("/health") + expect(page).to have_http_status(204) + end end