Bake and snapshots
What a bake does
Section titled “What a bake does”forkstage bake in a repository with a forkstage.yaml:
- Packs the repository (without
node_modules,.git,dist,.venv,target) and sends it with the recipe to the control plane, which picks a host. - The host boots a fresh microVM, writes the stack’s compose file, builds any
build:services, pulls images, and starts everything. - Waits for the
readycheck. - Runs
migrate, then every service’sdata.seed. - Snapshots the running VM: memory and disk, together. That is the snapshot, named after the git commit (or a timestamp outside git).
The output:
· Packing /Users/you/library-api· Baking library-api/aae11de in workspace yourname (10 KB of source)· Snapshot ready in 49.8 s on lat1✓ Snapshot library-api/aae11de is ready (baked in 48.8 s)Typical times: 20 s for a Node app with a stock image, 50 to 60 s for a Java app that compiles with Maven, longer if your Dockerfile downloads a lot.
Forks use the newest snapshot
Section titled “Forks use the newest snapshot”forkstage up and the GitHub App always fork the stack’s newest snapshot. Older snapshots stay listed on the stack page until you delete the stack.
When to bake again
Section titled “When to bake again”- Your dependencies, Dockerfile, migrations or seed data changed.
- You changed
forkstage.yaml. - You want the fork’s code to match a newer commit.
You do not need to bake for every code change you want to try: forks are for that. Change code, run it inside a fork (forkstage exec, forkstage sh), and bake when the base should move. The GitHub App applies each pull request’s diff on top of the newest snapshot, so a bake from main serves many pull requests.
Naming
Section titled “Naming”forkstage bake --name fridaynames the snapshot instead of using the commit. forkstage snapshots lists what you have.
Where the snapshot lives
Section titled “Where the snapshot lives”On the host that baked it, in a Forkstage-owned directory on an encrypted-at-rest disk. It contains your code and seed data. Deleting the stack deletes its snapshots. See Security and data.