App properties
Release channels
api_version pins your app to a Compose runtime version. You can use one of the release channels, or pin to a specific version:
"stable"— the current stable runtime. This is the recommended value for production apps."preview"— the latest pre-release runtime. Use this if you want early access to features that haven’t made it intostableyet. Expect more frequent changes.- A specific semver version (e.g.
"0.3.0") — pin to an exact runtime version. Useful when you want full control over when your app picks up runtime changes. Do not include avprefix. See the changelog for available versions.
api_version is older than the CLI, goldsky compose deploy will warn you and prompt before continuing. Pass -f to skip the prompt.
Basic example
ENV variables
You can set env variables in your manifest, which are injected into your task’s env context property. Env configuration is namespaced by environment, and only the values for the current environment are injected. Currently there are two environments:local, used when running your compose app locally, and cloud, used when your app is running after goldsky compose deploy — see the deploy guide for more.
Values must be strings. For anything sensitive (API keys, private keys), use secrets instead.
Example
Task configuration
Compose apps are made up of tasks, each task in thetasks array defines an executable unit of work and references a typescript file, see Task Authoring for
more details. Tasks can be triggered by HTTP requests from your app,
blockchain events, cron schedules, etc. See more about triggers below. Tasks can also trigger other tasks via the callTask context function
within the task code.
Name validation
App names must start and end with a letter or number, and contain only letters, numbers, underscores, and hyphens (e.g.my-app-1). The pattern is /^[a-zA-Z0-9]([a-zA-Z0-9_\-]*[a-zA-Z0-9])?$/.
Task names must start with a letter or number, and contain only letters, numbers, underscores, hyphens, and dots (e.g. fetch_prices, oracle.update). The pattern is /^[a-zA-Z0-9][a-zA-Z0-9_.\-]*$/. A leading underscore is no longer allowed.
Names that canonicalize the same (lowercased, with runs of -/_ collapsed to -) cannot coexist in a project. my-app, My_App, and my__app are treated as the same name, so the second deploy gets a conflict error.
Task properties
Triggers
Triggers are what runs your Compose tasks, these can be HTTP calls, onchain events, or cron jobs. For more information, see Triggers.Example
If you provide no triggers in your manifest then tasks can only be executed by other tasks.
Retry configuration
When specifying
retry_config, all three fields (max_attempts, initial_interval_ms, backoff_factor) are required. You cannot provide only some of them.- If a task fails, Compose waits
initial_interval_msbefore retrying - Each subsequent retry interval is multiplied by
backoff_factor - Example with above config: 1000ms → 2000ms → 4000ms
- After
max_attemptsfailures, the task is marked as permanently failed - When
retry_configis omitted, tasks default tomax_attempts: 3,initial_interval_ms: 1000, andbackoff_factor: 2.