Skip to content

Command Palette

Search for a command to run...

Deployments

Health checks

The health model, deploy tiers, modes, and how phelix.yaml endpoints interact with commands.

Configure health

phelix health configures HTTP health endpoints and the deploy-time health tier.

Terminal
phelix health set <App> --path /health --interval 10s --retries 3 --mode autophelix health add  <App> --name "API" --url https://api.example.com/healthphelix health list   <App>phelix health remove <App> --name "API"phelix health status <App> [--watch]   # --watch = live terminal dashboard

interval is the monitoring check interval (default 10s) and retries is the number of consecutive failures before marking an endpoint DOWN (default 3).

Health tiers

Blue-green and rolling deploys use a tiered model to decide when an instance is safe to receive traffic. Each tier defines what "alive" means when the stronger signal is unavailable:

TierTrigger"Alive" means
Tier 1Explicit --path setHTTP 2xx on that path
Tier 2No path, app speaks HTTPAny HTTP response (even 404/500)
Tier 3 (TCP)Not HTTP, or --mode tcp-onlyTCP port accepts connections
Tier 3 (PID)Worker/daemon, or --mode noneProcess PID still exists

Tier 1 is the strongest guarantee: a 2xx response on a path you chose proves the application is actually ready, not merely reachable. Tier 2 proves something speaks HTTP on the port. Tier 3 proves a process or socket exists - useful for workers and daemons that have no HTTP surface at all.

The mode flag

--mode on health set controls the fallback strategy explicitly:

ModeBehavior
auto (default)Select the strongest tier the app supports automatically
httpRequire HTTP checks (Tier 1/2)
tcp-onlySkip HTTP; only the TCP port check counts
noneSkip network checks; PID existence is the only signal

Health in phelix.yaml

Endpoints declared in phelix.yaml are applied to the app's persisted health configuration on every build / rebuild. Zero-downtime deploys use the first endpoint's path/mode as the deploy health tier - the same behavior as phelix health set. A health: block in the config replaces the persisted endpoints at the next build/rebuild; apps without a health: block keep whatever was set via the commands.

Watch status

Terminal
phelix health status <App> --watch

--watch renders a live terminal dashboard that updates as health state changes.