Skip to content
Skillv1.0.0

flyio-core-workflow-a

Execute Fly.io primary workflow: deploy, scale, and manage apps with flyctl and fly.toml. Use when deploying applications, configuring regions, setting secrets, or managing the app lifecycle on Fly.io

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (plugins/saas-packs/flyio-pack/skills/flyio-core-workflow-a/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill flyio-core-workflow-a. Copyright stays with the author (MIT).

Fly.io Core Workflow A: Deploy & Scale

Overview

The primary Fly.io workflow: configure fly.toml, deploy apps, manage secrets, scale across regions, and control machine lifecycle.

Prerequisites

  • A reviewed image and configuration, app-scoped deployment identity, health criteria, launch owner, and rollback operator.
  • Staging synthetic traffic plus an approved region/data policy.

Output

Record a workflow receipt with release/image reference, app/region scope, health/canary result, scale decision, approver, and rollback outcome. Exclude secrets, config values, request bodies, and user data.

Examples

Deploy a fictitious staging app to one approved region, validate a generic health response under synthetic load, then simulate a failed check and restore the prior release. Expand to another region only after the owner accepts the canary receipt.

Instructions

Step 1: Configure fly.toml

# fly.toml — app configuration
app = "my-app"
primary_region = "iad"

[build]
  dockerfile = "Dockerfile"

[env]
  NODE_ENV = "production"
  PORT = "3000"

[http_service]
  internal_port = 3000
  force_https = true
  auto_stop_machines = "stop"    # Stop idle machines
  auto_start_machines = true     # Start on request
  min_machines_running = 1       # Always keep 1 warm

[http_service.concurrency]
  type = "requests"
  hard_limit = 250
  soft_limit = 200

[[vm]]
  cpu_kind = "shared"
  cpus = 1
  memory = "512mb"

Step 2: Deploy and Manage Secrets

# Set secrets (encrypted, injected as env vars)
fly secrets set DATABASE_URL="postgres://..." API_KEY="sk_..."

# List secrets (values hidden)
fly secrets list

# Deploy
fly deploy

# Check deployment status
fly status
fly releases

Step 3: Scale Across Regions

# Add machines in new regions
fly scale count 2 --region iad    # 2 machines in Virginia
fly scale count 1 --region lhr    # 1 machine in London
fly scale count 1 --region nrt    # 1 machine in Tokyo

# Adjust VM size
fly scale vm shared-cpu-2x --memory 1024

# Check current scale
fly scale show

Step 4: Manage App Lifecycle

# Restart all machines
fly apps restart

# Suspend an app (stop billing)
fly apps suspend my-app

# Resume
fly apps resume my-app

# Destroy (irreversible)
fly apps destroy my-app --yes

fly.toml Key Settings

Setting Default Recommended
auto_stop_machines "stop" "stop" for most, "suspend" for fast resume
auto_start_machines true true for HTTP services
min_machines_running 0 1 for production (avoid cold starts)
concurrency.soft_limit 200 Tune based on app capacity

Error Handling

Error Cause Solution
failed to build Dockerfile issue Test locally: docker build .
health check failed App not responding on internal_port Verify port matches app config
no machines running All stopped Set min_machines_running = 1

Resources

Next Steps

For Postgres and volumes, see flyio-core-workflow-b.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-flyio-core-wo-01d15f/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-flyio-core-wo-01d15f.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-flyio-core-wo-01d15f",
  "kind": "skill",
  "name": "flyio-core-workflow-a",
  "description": "Execute Fly.io primary workflow: deploy, scale, and manage apps with flyctl and fly.toml. Use when deploying applications, configuring regions, setting secrets, or managing the app lifecycle on Fly.io. Trigger: \"fly deploy\", \"fly.io app management\", \"fly scale\", \"fly.io regions\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "saas",
      "edge-compute",
      "flyio",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Execute Fly.io primary workflow: deploy, scale, and manage apps with flyctl and fly.toml. Use when deploying applications, configuring regions, setting secrets, or managing the app lifecycle on Fly.io. Trigger: \"fly deploy\", \"fly.io app management\", \"fly scale\", \"fly.io regions\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "plugins/saas-packs/flyio-pack/skills/flyio-core-workflow-a/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/plugins/saas-packs/flyio-pack/skills/flyio-core-workflow-a/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/plugins/saas-packs/flyio-pack/skills/flyio-core-workflow-a/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(fly:*),",
      "Bash(curl:*),",
      "Grep"
    ],
    "license": "MIT"
  },
  "instructions": "# Fly.io Core Workflow A: Deploy & Scale\n\n## Overview\n\nThe primary Fly.io workflow: configure `fly.toml`, deploy apps, manage secrets, scale across regions, and control machine lifecycle.\n\n## Prerequisites\n\n- A reviewed image and configuration, app-scoped deployment identity, health criteria, launch owner, and rollback operator.\n- Staging synthetic traffic plus an approved region/data policy.\n\n## Output\n\nRecord a workflow receipt with release/image reference, app/region scope, health/canary result, scale decision, approver, and rollback outcome. Exclude secrets, config values, request bodies, ",
  "cost": {
    "context_tokens": 821
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-flyio-core-wo-01d15f/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.