Templates
A set of apps and the managed data they need, published as a GitHub repository and checked before anyone installs it.
A template is a YAML file that describes a set of apps, the databases and stores they need, and the questions an installer has to answer — a domain, a secret, a choice of engine version. The community publishes them as GitHub repositories, and the catalog lists every release that passes the same validator an instance runs. An instance only ever consumes one.
The split is deliberate. GitHub holds authorship, history and discussion. The catalog holds nothing but what it read. An instance owns the machine, the secrets, and every decision the template itself cannot make.
What a template may not contain
Four rules come straight out of what an instance enforces, and they bound what a template can ever be.
No domain. A hostname is unique across a whole instance and is refused if it collides with one of the instance's own names. A literal host would make a template installable exactly once, on one machine. Domains come from inputs instead — the installer supplies the name at install time.
No machine names. Which node something runs on is instance-local:
a template says scale, or spread to follow the cluster, never a
node.
No push-registry app. An app whose image you docker push has no
image until somebody pushes one. A template's apps run a public image,
or a public repository built on the instance from a Dockerfile or with
Railpack.
No volumes and no command override, because apps on this platform have neither. Persistent data is a managed database or a bucket, so every app in a template is stateless — and a template cannot express the common web-plus-worker pair built from one image, unless that image picks its role from an environment variable.
Excluded for the same reason, all of it instance-level: DNS providers, backup schedules, certificates, firewall rules, external registries, and stored credentials. A template that could carry a credential would be a template that could steal one.
Checking a file
Point an editor at the published schema for live completion and inline errors — the address is permanent:
https://cubeship.dev/schema/template/v1.jsonThe schema checks the shape. Everything beyond it — references, engines, domains — is checked when a release is read, and a refused release lists every reason. See Diagnostics for what each code means.
Where to go
Publishing
The repository, the three files, and what happens to a release.
The file
Every block a template may contain, field by field, with the defaults.
Inputs
The six ways a template asks the installer a question.
References
How one part of a template points at another, and how an app reaches another app.
Diagnostics
Every code the validator can return, and what to do about it.