Dagger
Search

flyio

(For the moment it's used to deploy to an existing app)

Installation

dagger install github.com/NunoFrRibeiro/daggerverse/fly@v0.1.3

Entrypoint

Return Type
Flyio !
Arguments
NameTypeDescription
versionString Fly.io Container version
tokenSecret !Token to connect to fly.io,
regionsString 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
orgString The target Fly.io organizatio (defaults to personal)
containerContainer Use a custom container with Fly installed
Example
dagger -m github.com/NunoFrRibeiro/daggerverse/fly@8df287d2a09a1f9e9ca6b685b484bf178e7b7b9d 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
NameTypeDefault ValueDescription
dirDirectory !-Directory from where to deploy the app (assumes there's a fly.toml in the directory)
imageString -Deploy using a Docker image
Example
dagger -m github.com/NunoFrRibeiro/daggerverse/fly@8df287d2a09a1f9e9ca6b685b484bf178e7b7b9d 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
NameTypeDefault ValueDescription
appNameString !-App name Ex: `goblog-2024-08-06`
Example
dagger -m github.com/NunoFrRibeiro/daggerverse/fly@8df287d2a09a1f9e9ca6b685b484bf178e7b7b9d 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)
}