deploy
Installation
SKILL.md
Elixir/Phoenix Deployment Reference
Quick reference for deploying Elixir/Phoenix applications.
Iron Laws — Never Violate These
- Config at runtime, not compile time — Secrets in
config.exsget baked into the release binary. Useruntime.exswith env vars so secrets are resolved at boot - Graceful shutdown ≥ 60 seconds — Shorter timeouts kill in-flight requests and WebSocket connections mid-operation, causing data loss for users
- Health checks required — Without startup/liveness/readiness endpoints, orchestrators can't distinguish a booting node from a dead one, leading to cascading restarts
- SSL verification for database — Skipping
verify: :verify_peerallows MITM attacks between your app and database; production data traverses the connection - No CPU limits — The BEAM scheduler assumes it owns all cores; cgroups CPU limits cause scheduler collapse where the VM thinks it has more cores than it can use, leading to latency spikes
- Guard optional service credentials —
runtime.exsruns whenever a release boots, includingeval-based migration commands. Only require S3, Redis, and similar credentials when that integration is enabled