pulibrary / bibdata

Local API for retrieving bibliographic and other useful data from Alma (Ruby 3.1.0, Rails 7.0)
BSD 2-Clause "Simplified" License
16 stars 7 forks source link

Add a health.json endpoint that determines this application is ready to be live to users #2409

Open maxkadel opened 1 week ago

maxkadel commented 1 week ago

What maintenance needs to be done?

We want the load balancer to never serve sites that are broken. That can happen automatically if every application has a health.json endpoint that the load balancer can check.

Level of urgency

Why is this maintenance needed?

Right now it's easy to deploy to one of x servers, have that deploy fail, and thus have the site go down, unless we do a laborious load balancer dance.

Acceptance criteria

Implementation notes, if any

An example implementation: https://github.com/pulibrary/lae-blacklight/pull/380/files

First Step

Install the health-monitor-rails gem to the gem file, as per the above PR.

Health monitor rails gem: https://github.com/lbeder/health-monitor-rails