← 返回
未分类 Key 中文

Fly.io

Deploy and manage applications on Fly.io using the flyctl CLI and Machines API. Use when asked to deploy an app, scale machines, check app status, view logs,...
使用 flyctl CLI 和 Machines API 在 Fly.io 上部署和管理应用,包括部署、扩缩机器、查看状态和日志等。
dwhite-oss dwhite-oss 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 347
下载
💾 0
安装
1
版本
#deployment#devops#flyio#hosting#infrastructure#latest

概述

Fly.io Skill

Fly.io is managed via the flyctl CLI (alias: fly) and the Machines REST API.

Auth

fly auth login          # opens browser
fly auth token          # print current token
export FLY_API_TOKEN=$(fly auth token)

App Management

fly apps list                          # list all apps
fly status -a <app-name>               # app health + machine states
fly info -a <app-name>                 # app details, IPs, regions
fly open -a <app-name>                 # open in browser

Deploy

fly deploy                             # deploy from current dir (uses fly.toml)
fly deploy --image registry/image:tag  # deploy a specific image
fly deploy --remote-only               # build remotely (no local Docker needed)
fly deploy -a <app-name>               # target specific app

Logs

fly logs -a <app-name>                 # live log stream
fly logs -a <app-name> --no-tail       # recent logs, no follow

Secrets

fly secrets set MY_KEY=value -a <app-name>
fly secrets list -a <app-name>
fly secrets unset MY_KEY -a <app-name>

Scaling

fly scale count 3 -a <app-name>                    # set machine count
fly scale memory 512 -a <app-name>                 # set RAM (MB)
fly scale vm shared-cpu-2x -a <app-name>           # change VM size
fly scale show -a <app-name>                        # current scale

Machines

fly machine list -a <app-name>
fly machine status <machine-id> -a <app-name>
fly machine restart <machine-id> -a <app-name>
fly machine stop <machine-id> -a <app-name>
fly machine destroy <machine-id> -a <app-name>

Run a Command (one-off)

fly ssh console -a <app-name>                      # interactive shell
fly ssh console -a <app-name> -C "ls -la /app"    # run single command

Postgres

fly postgres create --name myapp-db                # create Postgres cluster
fly postgres connect -a myapp-db                   # psql shell
fly postgres attach myapp-db -a <app-name>         # attach DB to app (sets DATABASE_URL)

VM Sizes

shared-cpu-1x (256MB), shared-cpu-2x (512MB), performance-1x (2GB), performance-2x (4GB)

Regions

iad (Virginia), ord (Chicago), lax (LA), sea (Seattle), ams (Amsterdam), fra (Frankfurt), sin (Singapore), syd (Sydney)

Tips

  • fly.toml is the app config — always check it before deploying
  • fly deploy --strategy rolling for zero-downtime deploys
  • Health checks in fly.toml under [checks] block

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 05:17 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,516
it-ops-security

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 90 📥 30,848
dev-programming

Sanity CMS

dwhite-oss
通过GROQ查询和Sanity HTTP API查询和管理Sanity CMS内容。用于在被要求从Sanity数据集中获取内容、创建或更新文档时使用。
★ 0 📥 406