Providers

Flightcontrol

通过 Flightcontrol 将 Nitro 应用部署到 AWS。

预设:flightcontrol

¥Preset: flightcontrol

Read more in flightcontrol.dev.
Flightcontrol 对 Nuxt 项目没有任何配置支持。

设置你的 FlightControl 账户

¥Set Up your flightcontrol account

总体而言,首次部署项目需要遵循以下步骤:

¥On a high level, the steps you will need to follow to deploy a project for the first time are:

  1. Flightcontrol 上创建一个账户
  2. AWS 上创建一个账户(如果你还没有账户)
  3. 将你的 AWS 账户关联到 Flightcontrol
  4. 授权 Flightcontrol GitHub 应用访问你选择的公共或私有存储库。
  5. 创建一个 Flightcontrol 项目,通过仪表盘或 flightcontrol.json 进行配置。

通过仪表盘创建项目并进行配置

¥Create a project with configuration via the dashboard

  1. 从仪表盘创建一个 Flightcontrol 项目。选择源存储库。
  2. 选择 GUI 配置类型。
  3. 选择 Nuxt 预设。此预设也适用于任何基于 Nitro 的应用。
  4. 选择你首选的 AWS 服务器大小。
  5. 提交新项目表单。

通过 flightcontrol.json 创建项目并进行配置

¥Create a project with configuration via flightcontrol.json

  1. 从仪表盘创建一个 Flightcontrol 项目。选择源存储库。
  2. 选择 flightcontrol.json 配置类型。
  3. 在代码库根目录下添加一个名为 flightcontrol.json 的新文件。以下是为你的应用创建 AWS Fargate 服务的示例配置:
flightcontrol.json
{
  "$schema": "https://app.flightcontrol.dev/schema.json",
  "environments": [
    {
      "id": "production",
      "name": "Production",
      "region": "us-west-2",
      "source": {
        "branch": "main"
      },
      "services": [
        {
          "id": "nitro",
          "buildType": "nixpacks",
          "name": "My Nitro site",
          "type": "fargate",
          "domain": "www.yourdomain.com",
          "outputDirectory": ".output",
          "startCommand": "node .output/server/index.mjs",
          "cpu": 0.25,
          "memory": 0.5
        }
      ]
    }
  ]
}
  1. 提交新项目表单。
了解更多关于 Flightcontrol 的 configuration 的信息。