Tools: Fly.io Has a Free API — Deploy Docker Apps Globally With 3 VMs Free

Tools: Fly.io Has a Free API — Deploy Docker Apps Globally With 3 VMs Free

Global Deployment in One Command

REST API

GraphQL API (Machines)

Fly.io vs Alternatives Fly.io runs your Docker containers close to users worldwide. Free tier: 3 shared VMs, 160GB bandwidth, 3GB persistent storage. Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse

Command

Copy

$ -weight: 500;">curl -L https://fly.io/-weight: 500;">install.sh | sh fly auth login fly launch # Auto-detects your app type fly deploy -weight: 500;">curl -L https://fly.io/-weight: 500;">install.sh | sh fly auth login fly launch # Auto-detects your app type fly deploy -weight: 500;">curl -L https://fly.io/-weight: 500;">install.sh | sh fly auth login fly launch # Auto-detects your app type fly deploy import requests TOKEN = "your_fly_api_token" # fly tokens create HEADERS = {"Authorization": f"Bearer {TOKEN}"} def list_apps(): r = requests.get("https://api.machines.dev/v1/apps", headers=HEADERS) return [{"name": a["name"], "-weight: 500;">status": a["-weight: 500;">status"]} for a in r.json()] def scale_app(app_name, count): r = requests.post(f"https://api.machines.dev/v1/apps/{app_name}/machines", headers=HEADERS, json={"config": {"image": "your-image"}}) return r.json() import requests TOKEN = "your_fly_api_token" # fly tokens create HEADERS = {"Authorization": f"Bearer {TOKEN}"} def list_apps(): r = requests.get("https://api.machines.dev/v1/apps", headers=HEADERS) return [{"name": a["name"], "-weight: 500;">status": a["-weight: 500;">status"]} for a in r.json()] def scale_app(app_name, count): r = requests.post(f"https://api.machines.dev/v1/apps/{app_name}/machines", headers=HEADERS, json={"config": {"image": "your-image"}}) return r.json() import requests TOKEN = "your_fly_api_token" # fly tokens create HEADERS = {"Authorization": f"Bearer {TOKEN}"} def list_apps(): r = requests.get("https://api.machines.dev/v1/apps", headers=HEADERS) return [{"name": a["name"], "-weight: 500;">status": a["-weight: 500;">status"]} for a in r.json()] def scale_app(app_name, count): r = requests.post(f"https://api.machines.dev/v1/apps/{app_name}/machines", headers=HEADERS, json={"config": {"image": "your-image"}}) return r.json() def fly_graphql(query): r = requests.post("https://api.fly.io/graphql", headers={**HEADERS, "Content-Type": "application/json"}, json={"query": query}) return r.json() # Get app details result = fly_graphql("""{ apps { nodes { name -weight: 500;">status hostname } } }""") for app in result["data"]["apps"]["nodes"]: print(f"{app[name]}: {app[-weight: 500;">status]} ({app[hostname]})") def fly_graphql(query): r = requests.post("https://api.fly.io/graphql", headers={**HEADERS, "Content-Type": "application/json"}, json={"query": query}) return r.json() # Get app details result = fly_graphql("""{ apps { nodes { name -weight: 500;">status hostname } } }""") for app in result["data"]["apps"]["nodes"]: print(f"{app[name]}: {app[-weight: 500;">status]} ({app[hostname]})") def fly_graphql(query): r = requests.post("https://api.fly.io/graphql", headers={**HEADERS, "Content-Type": "application/json"}, json={"query": query}) return r.json() # Get app details result = fly_graphql("""{ apps { nodes { name -weight: 500;">status hostname } } }""") for app in result["data"]["apps"]["nodes"]: print(f"{app[name]}: {app[-weight: 500;">status]} ({app[hostname]})")