Part 4: Update the Sandbox
Add a command
Section titled “Add a command”Clone a second repository onto Golden:
export const Golden = Archil.Sandbox("Golden", { run: [ "git clone --depth 1 https://github.com/sindresorhus/is /work/is", "git clone --depth 1 https://github.com/sindresorhus/slugify /work/slugify", ],});Deploy the new sandbox
Section titled “Deploy the new sandbox”pnpm alchemy deploybun alchemy deploynpx alchemy deployyarn alchemy deployThe commands changed, so Alchemy replaces Golden: it creates a new sandbox, runs every command in it, and deletes the old one. The program forks whatever Golden is now, and isn’t redeployed.
curl -X POST "$URL/run" -d 'ls ..'curl -X POST "$URL/run" -d 'ls ..'curl -X POST "$URL/run" -d 'ls ..'curl -X POST "$URL/run" -d 'ls ..'Existing forks keep theirs
Section titled “Existing forks keep theirs”A fork is a copy taken when it was created. Users who already have one keep it, with their changes and without slugify. Users who arrive after the deploy fork the new Golden. To move a user onto it, delete their fork; their next request forks it again.
Part 5 tests it.