fly-io
Installation
SKILL.md
Fly.io
Overview
Fly.io deploys applications to Firecracker microVMs across 30+ edge regions worldwide, providing sub-50ms latency to users. It supports scale-to-zero machines, persistent NVMe volumes, LiteFS for multi-region SQLite replication, and private WireGuard networking between services.
Instructions
- When deploying applications, use
fly launchto auto-detect the framework and generate a Dockerfile, thenfly deployfor zero-downtime rolling updates with health checks. - When configuring scaling, use
auto_stop_machinesandauto_start_machinesinfly.tomlto scale to zero when idle and wake on incoming requests, and set machine sizing appropriate to the workload. - When managing multi-region deployments, use
fly scale count --regionto distribute machines,fly-replayheader to route writes to the primary region, and LiteFS for SQLite read replicas. - When handling persistent data, attach volumes for durable storage (machines are ephemeral), use LiteFS for multi-region SQLite, or Tigris for S3-compatible object storage.
- When connecting services, use
.internalDNS for private service-to-service communication over the WireGuard mesh and never expose internal services to the public internet. - When managing secrets, use
fly secrets set KEY=valuefor encrypted secret storage accessible as environment variables. - When troubleshooting, use
fly logsfor real-time streaming,fly ssh consoleto access running machines, andfly proxyto tunnel to internal services.