flyio
Currently only deploys.Assumes there is a valid fly.toml in the path provided to --dir.
Installation
dagger install github.com/gerhard/daggerverse/flyio@v0.1.1
Entrypoint
Return Type
Flyio !
Arguments
Name | Type | Description |
---|---|---|
token | Secret ! | fly auth token: `--token=env:FLY_API_TOKEN` |
org | String | Fly.io org where all operations will run in, defaults to: `--org=personal` |
version | String | flyctl version to use: `--version=0.2.79` |
container | Container | Custom container to use as the base container |
Example
dagger -m github.com/gerhard/daggerverse/flyio@83aa116d153b38d1a0aa778cf2f10660c2443b15 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() 🔗
Deploys app from current directory: dagger call ... deploy --dir=hello-static
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | App directory - must contain `fly.toml` |
Example
dagger -m github.com/gerhard/daggerverse/flyio@83aa116d153b38d1a0aa778cf2f10660c2443b15 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() 🔗
Creates app - required for deploy to work: dagger call ... create --app=gostatic-example-2024-07-03
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
app | String ! | - | App name: `--app=myapp-2024-07-03` |
Example
dagger -m github.com/gerhard/daggerverse/flyio@83aa116d153b38d1a0aa778cf2f10660c2443b15 call \
--token env:MYSECRET create --app string
func (m *myModule) example(ctx context.Context, token *Secret, app string) string {
return dag.
Flyio(token).
Create(ctx, app)
}
@function
async def example(token: dagger.Secret, app: str) -> str:
return await (
dag.flyio(token)
.create(app)
)
@func()
async example(token: Secret, app: string): Promise<string> {
return dag
.flyio(token)
.create(app)
}
terminal() 🔗
Opens terminal in this app: dagger call ... terminal --app=gostatic-example-2024-07-03 --interactive
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
app | String ! | - | App name: `--app=myapp-2024-07-03` |
Example
dagger -m github.com/gerhard/daggerverse/flyio@83aa116d153b38d1a0aa778cf2f10660c2443b15 call \
--token env:MYSECRET terminal --app string
func (m *myModule) example(token *Secret, app string) *Container {
return dag.
Flyio(token).
Terminal(app)
}
@function
def example(token: dagger.Secret, app: str) -> dagger.Container:
return (
dag.flyio(token)
.terminal(app)
)
@func()
example(token: Secret, app: string): Container {
return dag
.flyio(token)
.terminal(app)
}