Skip to content

Bake and snapshots

forkstage bake in a repository with a forkstage.yaml:

  1. Packs the repository (without node_modules, .git, dist, .venv, target) and sends it with the recipe to the control plane, which picks a host.
  2. The host boots a fresh microVM, writes the stack’s compose file, builds any build: services, pulls images, and starts everything.
  3. Waits for the ready check.
  4. Runs migrate, then every service’s data.seed.
  5. 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.

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.

  • 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.

Terminal window
forkstage bake --name friday

names the snapshot instead of using the commit. forkstage snapshots lists what you have.

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.