@skaile/provider-fly
v0.1.0
Published
Fly Machines deploy target for @skaile/workspaces
Readme
@skaile/provider-fly
A Fly Machines deploy target for
@skaile/workspaces. It
stands a workspace up as a Fly Machine and reaches it over the app's public TLS
edge.
Install
skaile plugin install @skaile/provider-flyAdd it to skaile.yaml:
plugins:
- "@skaile/provider-fly@^0.1.0"
deploy:
target: fly
config:
app: my-skaile-app
region: ams
apiToken: ${FLY_API_TOKEN}
buildStrategy: remoteConfig
| Field | Type | Default | Notes |
|---|---|---|---|
| app | string | — | Fly app name (required) |
| region | string | ams | Fly region code |
| image | string | — | Required unless buildStrategy: remote |
| size | string | shared-cpu-1x | Fly machine preset |
| port | number | 8080 | Workspace WS port |
| apiToken | string | — | FLY_API_TOKEN (required) |
| apiBaseUrl | string | https://api.machines.dev | Machines API base |
| buildStrategy | local \| remote \| managed | remote | remote builds via the fly CLI |
How it works
- No external SDK — talks to the Fly Machines REST API over
globalThis.fetch. buildStrategy: remoteinvokes theflyCLI (node:child_process) to build and push an image;local/managedrequire a pre-builtimage.wsUrlresolves towss://<app>.fly.dev:<port>(TLS terminated at Fly's edge,tlsTermination: "edge").
Limitations (v0.1.0)
wsUrluses the public<app>.fly.devhost; private.internaladdressing is not yet exposed.- The remote build path requires the
flyCLI onPATH. restore()readsFLY_API_TOKEN/FLY_API_HOSTNAMEfrom the environment (config is not persisted in the handle payload).
