Deploys applications globally on Fly.io edge infrastructure with Firecracker VMs, multi-region deployment, and usage-based pricing. Use when deploying to multiple regions, running containers at the edge, or needing fast cold starts.
Deploys applications globally on Fly.io's edge infrastructure using Firecracker VMs. Use when deploying to multiple regions, running containers at the edge, or needing fast cold starts.
/plugin marketplace add mgd34msu/goodvibes-plugin/plugin install goodvibes@goodvibes-marketThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/configuration.mdGlobal edge deployment platform running applications in Firecracker micro-VMs close to users.
# Install flyctl
curl -L https://fly.io/install.sh | sh
# Or on macOS
brew install flyctl
# Login
fly auth login
# Launch app (creates fly.toml)
fly launch
# Deploy
fly deploy
app = "my-app"
primary_region = "ord"
[build]
dockerfile = "Dockerfile"
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 1
[http_service.concurrency]
type = "requests"
hard_limit = 250
soft_limit = 200
[[vm]]
cpu_kind = "shared"
cpus = 1
memory_mb = 256
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["node", "dist/index.js"]
# First deploy creates app
fly launch
# Subsequent deploys
fly deploy
# Deploy specific Dockerfile
fly deploy --dockerfile Dockerfile.prod
# Deploy with build args
fly deploy --build-arg API_KEY=$API_KEY
[deploy]
strategy = "rolling" # default
# strategy = "immediate"
# strategy = "canary"
# strategy = "bluegreen"
# Add regions
fly regions add ams lhr syd
# List regions
fly regions list
# Remove region
fly regions remove syd
app = "my-app"
primary_region = "ord"
# Scale to multiple regions
[[vm]]
memory = "256mb"
cpu_kind = "shared"
cpus = 1
[vm.processes]
web = 2 # 2 machines per region
| Code | Location |
|---|---|
ord | Chicago |
iad | Virginia |
lax | Los Angeles |
ams | Amsterdam |
lhr | London |
fra | Frankfurt |
syd | Sydney |
nrt | Tokyo |
sin | Singapore |
# Set secrets
fly secrets set DATABASE_URL=postgres://... API_KEY=secret
# List secrets
fly secrets list
# Unset secret
fly secrets unset API_KEY
# fly.toml
[env]
NODE_ENV = "production"
LOG_LEVEL = "info"
[[env]]
NODE_ENV = "production"
[[env.region]]
region = "ord"
CDN_URL = "https://us-cdn.example.com"
[[env.region]]
region = "ams"
CDN_URL = "https://eu-cdn.example.com"
# Scale up
fly scale count 3
# Scale per region
fly scale count 2 --region ord
fly scale count 1 --region ams
# Scale VM size
fly scale vm shared-cpu-1x
fly scale vm dedicated-cpu-1x
fly scale memory 512
[http_service]
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 1
max_machines_running = 10
[http_service.concurrency]
type = "requests"
soft_limit = 100
hard_limit = 250
# Create Postgres cluster
fly postgres create
# Attach to app
fly postgres attach my-postgres-db
# Connect
fly postgres connect -a my-postgres-db
# Proxy to local
fly proxy 5432 -a my-postgres-db
# Create Redis
fly redis create
# Get connection string
fly redis status my-redis
# Create LiteFS cluster
fly apps create my-app-litefs
# Configure in fly.toml
[mounts]
source = "litefs"
destination = "/var/lib/litefs"
# Create volume
fly volumes create mydata --size 1 --region ord
# List volumes
fly volumes list
# Destroy volume
fly volumes destroy vol_xxx
# fly.toml
[mounts]
source = "mydata"
destination = "/data"
# Add domain
fly certs add example.com
# Check certificate status
fly certs show example.com
# Internal services communicate via .internal DNS
# api.internal:3000
# Allocate IPv4 (paid)
fly ips allocate-v4
# List IPs
fly ips list
[http_service]
internal_port = 3000
[[http_service.checks]]
grace_period = "5s"
interval = "10s"
timeout = "2s"
path = "/health"
method = "GET"
protocol = "http"
[processes]
web = "node dist/server.js"
worker = "node dist/worker.js"
[[http_service]]
processes = ["web"]
internal_port = 3000
[[services]]
processes = ["worker"]
internal_port = 0
[processes]
worker = "node dist/worker.js"
[[services]]
processes = ["worker"]
internal_port = 0
auto_stop_machines = false
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
RUN npm prune --production
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./
ENV NODE_ENV=production
USER node
CMD ["node", "dist/index.js"]
app = "my-nextjs-app"
primary_region = "ord"
[build]
dockerfile = "Dockerfile"
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = true
auto_start_machines = true
[[vm]]
memory = "512mb"
cpu_kind = "shared"
cpus = 1
# App management
fly apps create my-app
fly apps list
fly apps destroy my-app
# Deployment
fly deploy
fly deploy --strategy immediate
fly status
# Logs
fly logs
fly logs -a my-app
# SSH
fly ssh console
fly ssh console -C "node -v"
# Monitoring
fly status
fly dashboard
# Scaling
fly scale show
fly scale count 3
fly scale memory 512
# Regions
fly regions list
fly regions add ord ams
# Secrets
fly secrets set KEY=value
fly secrets list
See references/configuration.md for complete fly.toml options.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.