feat(server): public GET /health endpoint for uptime monitors
Returns 200 with {status: ok, version, db: ok} when SQLite is reachable,
503 when the DB probe fails. Unauthenticated so external monitors can
poll without credentials.
This commit is contained in:
parent
3ce2940094
commit
579d7fc6e8
3 changed files with 52 additions and 0 deletions
|
|
@ -45,6 +45,12 @@ defmodule ServerWeb.Router do
|
|||
get "/hosts/:name", HostController, :show
|
||||
end
|
||||
|
||||
scope "/", ServerWeb do
|
||||
pipe_through :api
|
||||
|
||||
get "/health", HealthController, :show
|
||||
end
|
||||
|
||||
if Application.compile_env(:server, :dev_routes) do
|
||||
import Phoenix.LiveDashboard.Router
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue