In the shop, keep this resource definition:
resources: db: kind: postgres seed: file: seed.sql validate: "SELECT count(*) = 2 FROM products"Map the connection into the API:
services: api: env: DATABASE_URL: {resource: db, output: url}These are excerpts from the starter’s antil.yaml; keep the API command, port, and readiness settings.
Start each worktree after installing its dependencies and preparing its cache:
bun installbun run prepare:cacheantil session start --jsonCompare the database names and engine identifiers under data.resources.db in the two results. The database names differ; the engine identifier matches. Credentials stay in outputs.url.secret_ref and are passed to the API at launch.
If you need deliberately shared writes, end the affected workers and add sharing: seed and claim: {access: shared, permissions: [read, write]} to their db definition before starting them. Keep identical seed inputs. Do not choose this for workers that need independent orders or schema changes.
When the work is finished, end each session. Data is retained; review prune before deleting it.