Rules:
- Put slow installs in a named snapshot. A setup script repeats them at every start.
- Put secrets in an environment, never in a named snapshot. A named snapshot keeps every file on its disk.
- Boat has no custom image and no Dockerfile build. A named snapshot does that job: install your tools in a sandbox, then save it.
Example 1: a web app with a database URL
You want each sandbox to have your repository, its dependencies and aDATABASE_URL.
-
Add the repository and the variable to an environment:
-
Add the repository setup script
npm installin Dashboard > Environment. -
Create sandboxes with
boat new. Each one clones the repository, gets the variable and runsnpm install.
Example 2: heavy tools installed once
You need Python ML packages, a large dataset and Playwright browsers. They take 10 minutes to install.-
Create one sandbox and install everything in it:
-
Save the disk as a named snapshot:
-
Create each new sandbox from it. The tools are already there:
Example 3: one task file per sandbox
Each sandbox works on a different customer ticket. The setup differs per sandbox.--setup-file script runs once, as the user user. A fork does not run it again. Read Per-sandbox setup file.