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.
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 dashboardinterval 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:
| Tier | Trigger | "Alive" means |
|---|---|---|
| Tier 1 | Explicit --path set | HTTP 2xx on that path |
| Tier 2 | No path, app speaks HTTP | Any HTTP response (even 404/500) |
| Tier 3 (TCP) | Not HTTP, or --mode tcp-only | TCP port accepts connections |
| Tier 3 (PID) | Worker/daemon, or --mode none | Process 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:
| Mode | Behavior |
|---|---|
| auto (default) | Select the strongest tier the app supports automatically |
| http | Require HTTP checks (Tier 1/2) |
| tcp-only | Skip HTTP; only the TCP port check counts |
| none | Skip 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
phelix health status <App> --watch--watch renders a live terminal dashboard that updates as health state changes.