Add a health check URL to catch bad releases that deploy green
A green deploy only means the steps ran. A health URL checks that the app answers afterwards. Health checks are on Pro.
Add one
- Open Settings, Repositories, Edit.
- Under Health checks, pick the branch and enter the address, for example https://app.example.com/health.
- Save.
How it is checked
- It starts after the deploy is green and checks once a minute.
- Two failures in a row count as a failed deploy, and auto-revert takes over.
- The watch lasts 5 minutes by default. You can set 1 to 30 minutes under Timeouts, Watch health for.
Make a good health URL
- It must be reachable from the internet, not only from inside your network.
- Return a success status only when the app really works, for example when it can reach its database.
- Keep it fast and free of login.
Background reading: How to automatically revert a failed deploy (and when not to)
More guides: Set up automatic revert for a failed deploy