Stacks
A stack is the Workers, bindings and migrations your repo deploys as. You describe it once in a manifest, botallion.stack.toml or botallion.stack.json.
What the manifest says
Section titled “What the manifest says”| Section | What it holds |
|---|---|
name, previewNaming, productionNaming, deployOrder |
The stack’s name, how resources are named for previews and for production, and the order Workers deploy in |
[[workers]] |
Each Worker: its entry file, cron triggers, compatibility date and secrets |
[[d1]] |
A D1 database, its migrations folder and which Workers bind it |
[[r2]] |
An R2 bucket and its Workers |
kv |
KV namespaces |
[[services]] |
Service bindings between Workers |
Secrets are referenced by name and by their Secrets Store source. Their values are never in the manifest and never pass through Botallion. See Security.
Previews
Section titled “Previews”A preview is the stack deployed in isolation for one branch. Each preview gets its own D1 database, R2 bucket and KV namespace, so data written in one preview is invisible in another. A service binding inside a preview points at the sibling Worker in the same preview, never at production.
Preview URLs are on botallion.dev, in the form {branch}--{worker}--{stack}.botallion.dev. Nothing on botallion.dev is trusted by anything on botallion.ai.
Deploys run from the Cloudflare REST API on a Workflow:
- Create or adopt the preview’s resources.
- Apply migrations in filename order. Each preview tracks its own migrations, and one already applied isn’t applied again.
- Upload the Workers in
deployOrder, set crons, and switch each offworkers.dev. - Give each Worker its hostname.
- Record the deploy so the app can show URLs and progress.
Promotion
Section titled “Promotion”Promotion deploys the same stack to production names. It needs two things: a preview that succeeded, and your approval as the signed-in account. Pending migrations apply to the production database once, and promoting again applies nothing new.
You approve from the run view when it says Preview ready. The page shows the preview link, the verdict summary and the cost of the run.
Teardown
Section titled “Teardown”When a branch lands, its preview is torn down: routes first, then the Workers (callers before callees), then an R2 bucket is emptied before it’s deleted. Teardown uses exact names, so tearing down feat/a doesn’t touch feat/a-b, and it never touches production.
Your Cloudflare account
Section titled “Your Cloudflare account”Deploys go to your own Cloudflare account, through Connect Cloudflare. Botallion stores the scoped token you give it encrypted, and only the deployer uses it. Revoke it in Settings at any time and the deployer loses access on its next call. See Stacks and previews for what the token needs.