Dagger
Search

stormingplatform-sdk

Provides generic infrastructure functions for deploying containers on Fly.io,
provisioning Turso databases and Tigris storage, tracking deployment state,
and running health checks. All functions are parameterized with zero hardcoded
infrastructure values, making this safe to use across multiple projects.

Installation

dagger install github.com/stormingluke/stormingplatform-sdk@v0.1.0

Entrypoint

Return Type
StormingplatformSdk !
Arguments
NameTypeDefault ValueDescription
flyOrgString "personal"Fly.io organization slug
regionString "iad"Primary deployment region
tursoTokenSecret -Turso API token (use env:TURSO_API_TOKEN)
stateDbString "platform-state"State database name for deployment tracking
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
func (m *MyModule) Example() *dagger.StormingplatformSdk  {
	return dag.
			StormingplatformSdk()
}
@function
def example() -> dagger.StormingplatformSdk:
	return (
		dag.stormingplatform_sdk()
	)
@func()
example(): StormingplatformSdk {
	return dag
		.stormingplatformSdk()
}

Types

StormingplatformSdk 🔗

verifyHttp() 🔗

VerifyHttp checks a service’s HTTP health endpoint via flyctl status.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
flyTokenSecret !-Fly.io API token
appNameString !-App name
pathString !-Health check path (e.g. /health/alive)
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 verify-http --fly-token env:MYSECRET --app-name string --path string
func (m *MyModule) Example(ctx context.Context, flyToken *dagger.Secret, appName string, path string) string  {
	return dag.
			StormingplatformSdk().
			VerifyHttp(ctx, flyToken, appName, path)
}
@function
async def example(fly_token: dagger.Secret, app_name: str, path: str) -> str:
	return await (
		dag.stormingplatform_sdk()
		.verify_http(fly_token, app_name, path)
	)
@func()
async example(flyToken: Secret, appName: string, path: string): Promise<string> {
	return dag
		.stormingplatformSdk()
		.verifyHttp(flyToken, appName, path)
}

verifyTcp() 🔗

VerifyTcp checks a service is running via flyctl status.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
flyTokenSecret !-Fly.io API token
appNameString !-App name
portInteger !-Port to check
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 verify-tcp --fly-token env:MYSECRET --app-name string --port integer
func (m *MyModule) Example(ctx context.Context, flyToken *dagger.Secret, appName string, port int) string  {
	return dag.
			StormingplatformSdk().
			VerifyTcp(ctx, flyToken, appName, port)
}
@function
async def example(fly_token: dagger.Secret, app_name: str, port: int) -> str:
	return await (
		dag.stormingplatform_sdk()
		.verify_tcp(fly_token, app_name, port)
	)
@func()
async example(flyToken: Secret, appName: string, port: number): Promise<string> {
	return dag
		.stormingplatformSdk()
		.verifyTcp(flyToken, appName, port)
}

provisionTigris() 🔗

ProvisionTigris creates a Tigris S3-compatible storage bucket if it does not exist.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
flyTokenSecret !-Fly.io API token (Tigris is provisioned via Fly)
bucketNameString !-Bucket name to create
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 provision-tigris --fly-token env:MYSECRET --bucket-name string
func (m *MyModule) Example(ctx context.Context, flyToken *dagger.Secret, bucketName string) string  {
	return dag.
			StormingplatformSdk().
			ProvisionTigris(ctx, flyToken, bucketName)
}
@function
async def example(fly_token: dagger.Secret, bucket_name: str) -> str:
	return await (
		dag.stormingplatform_sdk()
		.provision_tigris(fly_token, bucket_name)
	)
@func()
async example(flyToken: Secret, bucketName: string): Promise<string> {
	return dag
		.stormingplatformSdk()
		.provisionTigris(flyToken, bucketName)
}

provisionTurso() 🔗

ProvisionTurso creates a Turso database if it does not exist.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
tursoTokenSecret !-Turso API token
dbNameString !-Database name
groupString "default"Turso group name
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 provision-turso --turso-token env:MYSECRET --db-name string
func (m *MyModule) Example(ctx context.Context, tursoToken *dagger.Secret, dbName string) string  {
	return dag.
			StormingplatformSdk().
			ProvisionTurso(ctx, tursoToken, dbName)
}
@function
async def example(turso_token: dagger.Secret, db_name: str) -> str:
	return await (
		dag.stormingplatform_sdk()
		.provision_turso(turso_token, db_name)
	)
@func()
async example(tursoToken: Secret, dbName: string): Promise<string> {
	return dag
		.stormingplatformSdk()
		.provisionTurso(tursoToken, dbName)
}

seedTurso() 🔗

SeedTurso applies a SQL schema file to a Turso database.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
tursoTokenSecret !-Turso API token
dbNameString !-Database name
schemaFileFile !-SQL schema file to apply
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 seed-turso --turso-token env:MYSECRET --db-name string --schema-file file:path
func (m *MyModule) Example(ctx context.Context, tursoToken *dagger.Secret, dbName string, schemaFile *dagger.File) string  {
	return dag.
			StormingplatformSdk().
			SeedTurso(ctx, tursoToken, dbName, schemaFile)
}
@function
async def example(turso_token: dagger.Secret, db_name: str, schema_file: dagger.File) -> str:
	return await (
		dag.stormingplatform_sdk()
		.seed_turso(turso_token, db_name, schema_file)
	)
@func()
async example(tursoToken: Secret, dbName: string, schemaFile: File): Promise<string> {
	return dag
		.stormingplatformSdk()
		.seedTurso(tursoToken, dbName, schemaFile)
}

flyCtl() 🔗

FlyCtl returns a container with the flyctl CLI authenticated via the given token.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
flyTokenSecret !-Fly.io API token
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 fly-ctl --fly-token env:MYSECRET
func (m *MyModule) Example(flyToken *dagger.Secret) *dagger.Container  {
	return dag.
			StormingplatformSdk().
			FlyCtl(flyToken)
}
@function
def example(fly_token: dagger.Secret) -> dagger.Container:
	return (
		dag.stormingplatform_sdk()
		.fly_ctl(fly_token)
	)
@func()
example(flyToken: Secret): Container {
	return dag
		.stormingplatformSdk()
		.flyCtl(flyToken)
}

flyAppCreate() 🔗

FlyAppCreate creates a Fly.io app if it does not already exist.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
flyTokenSecret !-Fly.io API token
appNameString !-App name to create
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 fly-app-create --fly-token env:MYSECRET --app-name string
func (m *MyModule) Example(ctx context.Context, flyToken *dagger.Secret, appName string) string  {
	return dag.
			StormingplatformSdk().
			FlyAppCreate(ctx, flyToken, appName)
}
@function
async def example(fly_token: dagger.Secret, app_name: str) -> str:
	return await (
		dag.stormingplatform_sdk()
		.fly_app_create(fly_token, app_name)
	)
@func()
async example(flyToken: Secret, appName: string): Promise<string> {
	return dag
		.stormingplatformSdk()
		.flyAppCreate(flyToken, appName)
}

flyVolumeCreate() 🔗

FlyVolumeCreate creates a Fly.io volume if it does not already exist.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
flyTokenSecret !-Fly.io API token
appNameString !-App the volume belongs to
volumeNameString !-Volume name
sizeGbInteger 10Size in GB
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 fly-volume-create --fly-token env:MYSECRET --app-name string --volume-name string
func (m *MyModule) Example(ctx context.Context, flyToken *dagger.Secret, appName string, volumeName string) string  {
	return dag.
			StormingplatformSdk().
			FlyVolumeCreate(ctx, flyToken, appName, volumeName)
}
@function
async def example(fly_token: dagger.Secret, app_name: str, volume_name: str) -> str:
	return await (
		dag.stormingplatform_sdk()
		.fly_volume_create(fly_token, app_name, volume_name)
	)
@func()
async example(flyToken: Secret, appName: string, volumeName: string): Promise<string> {
	return dag
		.stormingplatformSdk()
		.flyVolumeCreate(flyToken, appName, volumeName)
}

flySetSecrets() 🔗

FlySetSecrets sets secrets on a Fly.io app. Accepts key=value pairs.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
flyTokenSecret !-Fly.io API token
appNameString !-App name
secrets[String ! ] !-Secret key-value pairs as KEY=VALUE strings
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 fly-set-secrets --fly-token env:MYSECRET --app-name string --secrets string1 --secrets string2
func (m *MyModule) Example(ctx context.Context, flyToken *dagger.Secret, appName string, secrets []string) string  {
	return dag.
			StormingplatformSdk().
			FlySetSecrets(ctx, flyToken, appName, secrets)
}
@function
async def example(fly_token: dagger.Secret, app_name: str, secrets: List[str]) -> str:
	return await (
		dag.stormingplatform_sdk()
		.fly_set_secrets(fly_token, app_name, secrets)
	)
@func()
async example(flyToken: Secret, appName: string, secrets: string[]): Promise<string> {
	return dag
		.stormingplatformSdk()
		.flySetSecrets(flyToken, appName, secrets)
}

flyDeploy() 🔗

FlyDeploy pushes a container image to Fly’s registry and deploys it.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
flyTokenSecret !-Fly.io API token
appNameString !-App name
imageContainer !-Built container image to deploy
flyTomlFile -fly.toml configuration file
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 fly-deploy --fly-token env:MYSECRET --app-name string --image IMAGE:TAG
func (m *MyModule) Example(ctx context.Context, flyToken *dagger.Secret, appName string, image *dagger.Container) string  {
	return dag.
			StormingplatformSdk().
			FlyDeploy(ctx, flyToken, appName, image)
}
@function
async def example(fly_token: dagger.Secret, app_name: str, image: dagger.Container) -> str:
	return await (
		dag.stormingplatform_sdk()
		.fly_deploy(fly_token, app_name, image)
	)
@func()
async example(flyToken: Secret, appName: string, image: Container): Promise<string> {
	return dag
		.stormingplatformSdk()
		.flyDeploy(flyToken, appName, image)
}

flyPullPush() 🔗

FlyPullPush pulls a Docker Hub image and pushes it to the Fly.io registry. Returns the registry reference (e.g. registry.fly.io/myapp:v1.0.0).

Return Type
String !
Arguments
NameTypeDefault ValueDescription
flyTokenSecret !-Fly.io API token
appNameString !-App name (used as the registry namespace)
sourceImageString !-Source image reference (e.g. org/image:tag)
tagString "latest"Tag for the registry image
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 fly-pull-push --fly-token env:MYSECRET --app-name string --source-image string
func (m *MyModule) Example(ctx context.Context, flyToken *dagger.Secret, appName string, sourceImage string) string  {
	return dag.
			StormingplatformSdk().
			FlyPullPush(ctx, flyToken, appName, sourceImage)
}
@function
async def example(fly_token: dagger.Secret, app_name: str, source_image: str) -> str:
	return await (
		dag.stormingplatform_sdk()
		.fly_pull_push(fly_token, app_name, source_image)
	)
@func()
async example(flyToken: Secret, appName: string, sourceImage: string): Promise<string> {
	return dag
		.stormingplatformSdk()
		.flyPullPush(flyToken, appName, sourceImage)
}

flySsh() 🔗

FlySSH runs a command on a Fly.io app via SSH console.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
flyTokenSecret !-Fly.io API token
appNameString !-App name
commandString !-Command to run
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 fly-ssh --fly-token env:MYSECRET --app-name string --command string
func (m *MyModule) Example(ctx context.Context, flyToken *dagger.Secret, appName string, command string) string  {
	return dag.
			StormingplatformSdk().
			FlySsh(ctx, flyToken, appName, command)
}
@function
async def example(fly_token: dagger.Secret, app_name: str, command: str) -> str:
	return await (
		dag.stormingplatform_sdk()
		.fly_ssh(fly_token, app_name, command)
	)
@func()
async example(flyToken: Secret, appName: string, command: string): Promise<string> {
	return dag
		.stormingplatformSdk()
		.flySsh(flyToken, appName, command)
}

initStateDb() 🔗

InitStateDb provisions a Turso database and seeds its schema.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
tursoTokenSecret -Turso API token (uses constructor value if not provided)
dbNameString -Database name
schemaFileFile !-SQL schema file to apply
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 init-state-db --schema-file file:path
func (m *MyModule) Example(ctx context.Context, schemaFile *dagger.File) string  {
	return dag.
			StormingplatformSdk().
			InitStateDb(ctxschemaFile)
}
@function
async def example(schema_file: dagger.File) -> str:
	return await (
		dag.stormingplatform_sdk()
		.init_state_db(schema_file)
	)
@func()
async example(schemaFile: File): Promise<string> {
	return dag
		.stormingplatformSdk()
		.initStateDb(schemaFile)
}

recordDeployment() 🔗

RecordDeployment records a deployment event in the state database.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
tursoTokenSecret -Turso API token (uses constructor value if not provided)
serviceNameString !-Service name
statusString !-Deployment status (in_progress, success, failed)
imageDigestString -Image digest or reference
errorMessageString -Error message if failed
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 record-deployment --service-name string --status string
func (m *MyModule) Example(ctx context.Context, serviceName string, status string) string  {
	return dag.
			StormingplatformSdk().
			RecordDeployment(ctxserviceName, status)
}
@function
async def example(service_name: str, status: str) -> str:
	return await (
		dag.stormingplatform_sdk()
		.record_deployment(service_name, status)
	)
@func()
async example(serviceName: string, status: string): Promise<string> {
	return dag
		.stormingplatformSdk()
		.recordDeployment(serviceName, status)
}

recordInfrastructure() 🔗

RecordInfrastructure records a provisioned infrastructure resource.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
tursoTokenSecret -Turso API token (uses constructor value if not provided)
resourceTypeString !-Resource type (turso_db, tigris_bucket, fly_app, fly_volume)
resourceNameString !-Resource name
serviceNameString -Associated service name
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 record-infrastructure --resource-type string --resource-name string
func (m *MyModule) Example(ctx context.Context, resourceType string, resourceName string) string  {
	return dag.
			StormingplatformSdk().
			RecordInfrastructure(ctxresourceType, resourceName)
}
@function
async def example(resource_type: str, resource_name: str) -> str:
	return await (
		dag.stormingplatform_sdk()
		.record_infrastructure(resource_type, resource_name)
	)
@func()
async example(resourceType: string, resourceName: string): Promise<string> {
	return dag
		.stormingplatformSdk()
		.recordInfrastructure(resourceType, resourceName)
}

infraExists() 🔗

InfraExists checks if an infrastructure resource exists in the state database.

Return Type
Boolean !
Arguments
NameTypeDefault ValueDescription
tursoTokenSecret -Turso API token (uses constructor value if not provided)
resourceTypeString !-Resource type
resourceNameString !-Resource name
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 infra-exists --resource-type string --resource-name string
func (m *MyModule) Example(ctx context.Context, resourceType string, resourceName string) bool  {
	return dag.
			StormingplatformSdk().
			InfraExists(ctxresourceType, resourceName)
}
@function
async def example(resource_type: str, resource_name: str) -> bool:
	return await (
		dag.stormingplatform_sdk()
		.infra_exists(resource_type, resource_name)
	)
@func()
async example(resourceType: string, resourceName: string): Promise<boolean> {
	return dag
		.stormingplatformSdk()
		.infraExists(resourceType, resourceName)
}

recordConfigGeneration() 🔗

RecordConfigGeneration records a config generation event with content hash.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
tursoTokenSecret -Turso API token (uses constructor value if not provided)
configTypeString !-Config type identifier
contentHashString !-SHA-256 hash of generated content
servicesHashString !-SHA-256 hash of services that contributed
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 record-config-generation --config-type string --content-hash string --services-hash string
func (m *MyModule) Example(ctx context.Context, configType string, contentHash string, servicesHash string) string  {
	return dag.
			StormingplatformSdk().
			RecordConfigGeneration(ctxconfigType, contentHash, servicesHash)
}
@function
async def example(config_type: str, content_hash: str, services_hash: str) -> str:
	return await (
		dag.stormingplatform_sdk()
		.record_config_generation(config_type, content_hash, services_hash)
	)
@func()
async example(configType: string, contentHash: string, servicesHash: string): Promise<string> {
	return dag
		.stormingplatformSdk()
		.recordConfigGeneration(configType, contentHash, servicesHash)
}

getLastConfigHash() 🔗

GetLastConfigHash retrieves the most recent content hash for a config type.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
tursoTokenSecret -Turso API token (uses constructor value if not provided)
configTypeString !-Config type
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 get-last-config-hash --config-type string
func (m *MyModule) Example(ctx context.Context, configType string) string  {
	return dag.
			StormingplatformSdk().
			GetLastConfigHash(ctxconfigType)
}
@function
async def example(config_type: str) -> str:
	return await (
		dag.stormingplatform_sdk()
		.get_last_config_hash(config_type)
	)
@func()
async example(configType: string): Promise<string> {
	return dag
		.stormingplatformSdk()
		.getLastConfigHash(configType)
}

buildClicontainer() 🔗

BuildCLIContainer builds the CLI tools container with turso, flyctl, jq, and curl. Used internally by FlyCtl, ProvisionTurso, and other CLI-based functions.

Return Type
Container !
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 build-clicontainer
func (m *MyModule) Example() *dagger.Container  {
	return dag.
			StormingplatformSdk().
			BuildClicontainer()
}
@function
def example() -> dagger.Container:
	return (
		dag.stormingplatform_sdk()
		.build_clicontainer()
	)
@func()
example(): Container {
	return dag
		.stormingplatformSdk()
		.buildClicontainer()
}

publishClicontainer() 🔗

PublishCLIContainer builds and pushes the CLI tools container to a container registry.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
registryTokenSecret !-Registry authentication token (e.g. GitHub token with packages:write)
registryRefString !-Full registry reference (e.g. ghcr.io/yourorg/cli-tools)
registryUserString !-Registry username for authentication
registryHostString !-Registry hostname for authentication (e.g. ghcr.io)
tagString "latest"Image tag
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 publish-clicontainer --registry-token env:MYSECRET --registry-ref string --registry-user string --registry-host string
func (m *MyModule) Example(ctx context.Context, registryToken *dagger.Secret, registryRef string, registryUser string, registryHost string) string  {
	return dag.
			StormingplatformSdk().
			PublishClicontainer(ctx, registryToken, registryRef, registryUser, registryHost)
}
@function
async def example(registry_token: dagger.Secret, registry_ref: str, registry_user: str, registry_host: str) -> str:
	return await (
		dag.stormingplatform_sdk()
		.publish_clicontainer(registry_token, registry_ref, registry_user, registry_host)
	)
@func()
async example(registryToken: Secret, registryRef: string, registryUser: string, registryHost: string): Promise<string> {
	return dag
		.stormingplatformSdk()
		.publishClicontainer(registryToken, registryRef, registryUser, registryHost)
}

goBuilder() 🔗

GoBuilder returns a Go builder container with module and build caching. Useful for building Go services with standard caching patterns.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-Go source directory (must contain go.mod)
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 go-builder --source DIR_PATH
func (m *MyModule) Example(source *dagger.Directory) *dagger.Container  {
	return dag.
			StormingplatformSdk().
			GoBuilder(source)
}
@function
def example(source: dagger.Directory) -> dagger.Container:
	return (
		dag.stormingplatform_sdk()
		.go_builder(source)
	)
@func()
example(source: Directory): Container {
	return dag
		.stormingplatformSdk()
		.goBuilder(source)
}

debianSlim() 🔗

DebianSlim returns a minimal Debian container suitable for production deployments.

Return Type
Container !
Example
dagger -m github.com/stormingluke/stormingplatform-sdk@e3ab293206b5799e3bdfbec9257032364ea859d7 call \
 debian-slim
func (m *MyModule) Example() *dagger.Container  {
	return dag.
			StormingplatformSdk().
			DebianSlim()
}
@function
def example() -> dagger.Container:
	return (
		dag.stormingplatform_sdk()
		.debian_slim()
	)
@func()
example(): Container {
	return dag
		.stormingplatformSdk()
		.debianSlim()
}