Stack
A named group of briqs that can talk to each other.
A stack is a logical group of briqs inside a team. Briqs in a stack resolve each other by name over the team's private network, which is what makes multi-service recipes (Redis + a worker, Postgres + pgAdmin) work without any port publishing.
Naming and DNS
Every briq gets an internal host of the form <name>.<stack>.<team>.internal. Inside the network
the shorter <name>.<stack>.internal also resolves. So in a stack called s1, the API briq can
reach the database at db.s1.internal:5432.
Recipe outputs use these hosts. DATABASE_URL from the postgres recipe points at
db.<stack>.internal, which is exactly what another briq in the same stack should use.
Creating a stack
You rarely create one explicitly: briq_run creates a default stack for the key if none is
given, and reuses it on subsequent calls. Pass stack to group briqs deliberately:
briq_run({ recipe: "postgres", stack: "checkout" })
briq_run({ recipe: "redis", stack: "checkout" })
briq_run({ image: "ghcr.io/acme/checkout-api:pr-412", stack: "checkout", ports: [3000] })Over REST, POST /v1/stacks with { name, region } does the same, and DELETE /v1/stacks/:id
destroys every briq in it.
Isolation
The tenant boundary is the team: one private network per team, never shared
with another customer. Stacks inside a team share that network in v0. A stack can later opt into
isolated: true (Pro), which gives it its own app and network, for example to run untrusted
third-party code next to your own services without a route between them.