flyio
(For the moment it's used to deploy to an existing app)Installation
dagger install github.com/NunoFrRibeiro/daggerverse/fly@v0.1.4
Entrypoint
Return Type
Flyio !
Arguments
Name | Type | Description |
---|---|---|
version | String | Fly.io Container version |
token | Secret ! | Token to connect to fly.io, |
regions | String | Deploy to machines only in these regions. Multiple regions can be specified with comma separated valuesor or by providing the flag multiple times Ex: mad,fra |
org | String | The target Fly.io organizatio (defaults to personal) |
container | Container | Use a custom container with Fly installed |
Example
dagger -m github.com/NunoFrRibeiro/daggerverse/fly@15dc77018dcfcafe853d9ea0a1810ce9263cf061 call \
--token env:MYSECRET
func (m *myModule) example(token *Secret) *Flyio {
return dag.
Flyio(token)
}
@function
def example(token: dagger.Secret, ) -> dag.Flyio:
return (
dag.flyio(token)
)
@func()
example(token: Secret, ): Flyio {
return dag
.flyio(token)
}
Types
Flyio 🔗
deploy() 🔗
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | Directory from where to deploy the app (assumes there's a fly.toml in the directory) |
image | String | - | Deploy using a Docker image |
Example
dagger -m github.com/NunoFrRibeiro/daggerverse/fly@15dc77018dcfcafe853d9ea0a1810ce9263cf061 call \
--token env:MYSECRET deploy --dir DIR_PATH
func (m *myModule) example(ctx context.Context, token *Secret, dir *Directory) string {
return dag.
Flyio(token).
Deploy(ctx, dir)
}
@function
async def example(token: dagger.Secret, dir: dagger.Directory) -> str:
return await (
dag.flyio(token)
.deploy(dir)
)
@func()
async example(token: Secret, dir: Directory): Promise<string> {
return dag
.flyio(token)
.deploy(dir)
}
create() 🔗
Create a new application on the Fly platform
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
appName | String ! | - | App name Ex: `goblog-2024-08-06` |
Example
dagger -m github.com/NunoFrRibeiro/daggerverse/fly@15dc77018dcfcafe853d9ea0a1810ce9263cf061 call \
--token env:MYSECRET create --app-name string
func (m *myModule) example(ctx context.Context, token *Secret, appName string) string {
return dag.
Flyio(token).
Create(ctx, appName)
}
@function
async def example(token: dagger.Secret, app_name: str) -> str:
return await (
dag.flyio(token)
.create(app_name)
)
@func()
async example(token: Secret, appName: string): Promise<string> {
return dag
.flyio(token)
.create(appName)
}