Awesome-omni-skill fly-deploy
Deploy applications to Fly.io using flyctl. Handles project detection, fly.toml generation, secrets configuration, and deployment. Use when deploying apps to Fly.io, creating fly.toml files, debugging Fly.io deployment failures, or configuring Fly.io services.
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/fly-deploy" ~/.claude/skills/diegosouzapw-awesome-omni-skill-fly-deploy && rm -rf "$T"
skills/development/fly-deploy/SKILL.mdFly.io Deployment
Deploy applications to Fly.io from source code or Docker images.
Prerequisites
Ensure
flyctl is installed and authenticated:
# Check installation fly version # Authenticate if needed fly auth login
Deployment Workflow
1. Detect Project Type
Examine the project root to determine the stack:
| Indicator | Type | Reference |
|---|---|---|
| Next.js | references/nextjs.md |
| Docker | references/docker.md |
(no Next) | Node.js | references/nodejs.md |
/ | Python | references/python.md |
only | Static | references/static.md |
Read the appropriate reference file for framework-specific configuration.
2. Initialize or Configure
New app:
fly launch --no-deploy
This creates
fly.toml. Review and adjust before deploying.
Existing app (no fly.toml):
fly launch --no-deploy # Or create fly.toml manually using references/fly-toml.md
3. Set Secrets
Set environment variables that shouldn't be in fly.toml:
# Single secret fly secrets set DATABASE_URL="postgres://..." # Multiple secrets fly secrets set KEY1=value1 KEY2=value2 # From .env file cat .env | fly secrets import
Secrets trigger a redeploy. Use
--stage to batch them:
fly secrets set --stage KEY1=value1 fly secrets set --stage KEY2=value2 fly secrets deploy
4. Deploy
fly deploy
Common flags:
— High availability (2+ machines, default)--ha
— Single machine (dev/staging)--no-ha--strategy rolling|bluegreen|canary|immediate
— Extend for slow builds--wait-timeout 5m
5. Verify
# Check status fly status # View logs fly logs # Open in browser fly open
Troubleshooting
If deployment fails, consult references/troubleshooting.md for common errors and fixes.
Quick checks:
- Health check passing? Check
matches app's listen portinternal_port - App starting? Check
for crash loopsfly logs - Build failing? Check Dockerfile or buildpack compatibility
Configuration Reference
For detailed fly.toml options, see references/fly-toml.md.
Key settings:
— Where machines deploy by defaultprimary_region
— HTTP/HTTPS configuration[http_service]
— Non-sensitive environment variables[env]
— CPU/memory sizing[[vm]]