Skip to Content
Alzo

Patterns

Use cases that look like missing features and are not. Each entry names the problem in the words someone would use to ask for it, then the shape that answers it.

The configuration examples are compiled against the real types, with references to nodes defined elsewhere stubbed; that checks their shape, not cross-node references, image contents or application behavior. Start with the quickstart, and use everyday development for lifecycle and cleanup.


A dependency that a CLI creates

"I need supabase start — or a cloud emulator, or terraform apply — to be part of the graph, with everything else waiting on it."

A task starts it, a service adopts it. Teardown reverses automatically, because the dependency edge already gives reverse-topological order.

const supabaseUp = defineTask({
  name: 'supabase-up',
  run: 'supabase start',
  teardown: 'supabase stop',
});

const supabase = defineService({
  name: 'supabase',
  ports: { pg: { port: 54322, hostPort: 54322 } },
  provision: { adopt: { host: '127.0.0.1', port: { pg: 54322 } } },
  dependsOn: [supabaseUp.done],
  // Budget is period x failureThreshold, not `timeout` — `supabase start`
  // pulls images on a cold run, so allow two minutes of two-second checks.
  ready: { tcp: { on: 'pg' }, period: '2s', failureThreshold: 60 },
});

Pair it with requires: [{ command: 'supabase', hint: '…' }] so a missing CLI fails before anything starts rather than midway through.

Getting generated files out of a container

"rails generate runs in the container and I need the migration in git." "The app rewrites its own config files and I need to commit them."

A bind mount is bidirectional — what the container writes at to is the file at from. The only real difficulty is ownership: a container runs as root by default and leaves root:root files you cannot edit without sudo.

defineTask({
  name: 'rails-gen',
  provision: { image: 'acme/rails-dev', args: ['bundle', 'exec', 'rails', 'generate', 'scaffold', 'Post'] },
  volumes: { app: { from: './app', to: '/srv/app' } },
  user: 'current',
});

The application-owned acme/rails-dev image must install Rails and the app's gems and set WORKDIR /srv/app; stock ruby does not contain Rails. The bind source must contain your Rails application.

Re-executing a process when a binary changes

"I rebuilt my Go binary and the container is still running the old one."

The bind mount delivers the file; watch re-executes the process. Nothing is copied and no protocol is involved.

defineService({
  name: 'go-app',
  ports: { http: 8080 },
  provision: { image: 'gcr.io/distroless/base', entrypoint: ['/srv/bin/server'] },
  volumes: { bin: { from: './dist', to: '/srv/bin' } },
  watch: { paths: ['./dist/server'], onChange: 'restart' },
});

Build dist/server for Linux and the container's architecture, make it executable, and have it listen on 0.0.0.0:8080. The image must supply any shared libraries it needs.

Reach for this only when a process cannot watch itself. Vite, tsx watch and air already do, and restarting them destroys the state they exist to preserve.

Keeping a containerized source loop off the Docker Desktop bind bridge

"The app has to run in Linux, but its source watcher is slow through a macOS bind mount."

Mirror the host tree into a per-instance Docker volume. The initial tree lands before start; one native repository watcher then copies changed subtrees and removes deleted paths. .git is excluded automatically. Leave restart false when the process already watches its files.

defineService({
  name: 'api',
  ports: { http: 3000 },
  provision: { image: 'node:24', args: ['node', '--watch', '/app/src/server.js'] },
  volumes: {
    source: {
      from: './apps/api/src',
      to: '/app/src',
      sync: true,
      ignore: ['**/*.map'],
    },
  },
});

This assumes a dependency-free Node entrypoint at apps/api/src/server.js that listens on 0.0.0.0:3000. For an application with dependencies, use its development image with dependencies installed.

Use restart: true only when the application has no watcher. Use a bind mount instead when the container must write files back into the worktree.

Running a command after a file changes, then restarting

"When the lockfile changes I need npm ci inside the container, and then the app has to restart."

This is a task with a watch, and a consumer with a restartOn. Ordering and invalidation are separate lists on purpose.

Create .alzo-local/node_modules first and ignore .alzo-local/ in Git. Both containers explicitly bind that same host directory. Named volumes are owned by a node: repeating a key or reusing an object does not share them. This example assumes package-lock.json and server.js in the config directory.

const source = { from: '.', to: '/srv', readOnly: true } as const;
const modules = { from: './.alzo-local/node_modules', to: '/srv/node_modules' } as const;

const install = defineTask({
  name: 'install',
  provision: { image: 'node:24', args: ['npm', 'ci', '--prefix', '/srv'] },
  volumes: { source, modules },
  watch: { paths: ['package-lock.json'] },
});

defineService({
  name: 'node-app',
  provision: { image: 'node:24', args: ['node', '/srv/server.js'] },
  volumes: { source, modules },
  dependsOn: [install.done],
  restartOn: [install.done],
});

Initialising something before it starts

"A container has to chown the data directory before the real service runs."

Use a task and a .done edge with an explicit shared bind mount. Create .alzo-local/data first and ignore .alzo-local/ in Git. The task below changes ownership of that host directory to uid 1000; choose the application's actual uid and a dedicated data directory. Do not point it at the source tree.

const seedVolume = { from: './.alzo-local/data', to: '/var/lib/data' } as const;

const init = defineTask({
  name: 'init-data',
  provision: { image: 'busybox', args: ['sh', '-c', 'chown -R 1000 /var/lib/data'] },
  volumes: { data: seedVolume },
});

defineService({
  name: 'store',
  ports: { http: 8080 },
  provision: { image: 'acme/store' },
  volumes: { data: seedVolume },
  dependsOn: [init.done],
});

Alzo never deletes bind-mounted host data. alzo down removes the containers; the operator removes the dedicated data directory separately when it is no longer needed. Two named data volumes would be separate and would not implement this pattern.

Doing something to a service once it is up

"Create the buckets after MinIO starts." Compose calls this post_start.

It is an ordinary task gated on .available — which already means ready, not started, so there is no race to lose.

const minio = defineService({
  name: 'minio',
  ports: { s3: 9000 },
  provision: { image: 'minio/minio', args: ['server', '/data'] },
  env: { MINIO_ROOT_USER: 'minioadmin', MINIO_ROOT_PASSWORD: 'minioadmin' },
  ready: { http: { path: '/minio/health/live', on: 's3' } },
  outputs: ({ hostname, port }) => ({ endpoint: `http://minioadmin:minioadmin@${hostname}:${port.s3}` }),
});

defineTask({
  name: 'buckets',
  provision: { image: 'minio/mc', args: ['mb', '--ignore-existing', 's3/uploads'] },
  dependsOn: [minio.available],
  env: () => ({ MC_HOST_s3: minio.outputs.endpoint }),
});

These literal MinIO credentials are for disposable local data. Use secret() for real credentials; literal strings are not automatically redacted.

Waiting for a whole group of things

"I want api to wait for all of infrastructure, without listing every database by hand every time I add one."

A dependency list is an array, so a barrier is .map(). No join node, no aggregate readiness feature.

const INFRA = 'infrastructure';

const db = defineService({
  name: 'db',
  ports: { pg: 5432 },
  group: INFRA,
  provision: { image: 'postgres:17' },
  env: { POSTGRES_PASSWORD: 'dev' },
});

const redis = defineService({
  name: 'redis',
  ports: { r: 6379 },
  group: INFRA,
  provision: { image: 'redis:8' },
});

const infrastructure = [db, redis];

defineService({
  name: 'api',
  run: 'pnpm dev',
  dependsOn: infrastructure.map((n) => n.available),
});

Two things worth doing deliberately here. Bind the group name to a const so the dashboard heading is not a repeated string literal that one node can misspell. And accept that membership is stated twice — once as group for display, once in the array for ordering — because they answer different questions; adding a node to one and forgetting the other is the failure mode to watch for.

alzo up infrastructure targets the group directly and starts the closure of everything in it, so the CLI needs no equivalent of the array.

Passing a value one node computes to another

"A script mints a certificate and the API needs its fingerprint." "stripe listen prints a webhook secret that three services need."

Alzo does not carry values produced by running something between nodes: every address it hands out is computable before anything starts, and keeping that true is what makes alzo plan complete and trustworthy. So the value travels through an explicit shared bind directory and is read at start time. Create and Git-ignore .alzo-local/cert first. The producer image below must contain mint-cert.sh; the consumer image must contain its application and shell.

const shared = { from: './.alzo-local/cert', to: '/shared' } as const;

const cert = defineTask({
  name: 'cert',
  provision: { image: 'acme/cert-generator', entrypoint: ['sh'], args: ['-c', './mint-cert.sh > /shared/fingerprint'] },
  volumes: { shared },
});

defineService({
  name: 'api',
  provision: {
    image: 'acme/api',
    // A container's command is `provision.args`, never `run`.
    entrypoint: ['sh'],
    args: ['-c', 'export FP=$(cat /shared/fingerprint); exec node server.js'],
  },
  volumes: { shared },
  dependsOn: [cert.done],
});

The shell expansion needs a shell in the consumer image. A host producer can instead write .alzo-local/cert/fingerprint directly; it does not declare volumes. Two host processes can use that same agreed file path. Keep the .done dependency so the consumer reads only after generation succeeds. Bind data survives alzo down and needs explicit owner cleanup. Generated credentials read directly from files are not automatically registered with secret() or redacted; this example passes a certificate fingerprint, not a credential.

Do this rather than the alternative found in real configurations, which is to run the generator once by hand and paste the result into the config as a literal — a published docker-compose.yml in the wild carries a hardcoded STEP_FINGERPRINT that its own CA generated, and it is wrong the moment anyone regenerates the CA.

Several peers that need each other's addresses

"Three Kafka brokers, and every one needs the full voter list including itself."

forward hoists the address surface before the nodes exist, so the cycle lives in addresses — which allocation resolves — rather than in liveness, which must stay acyclic. Changing the cluster size is a one-character edit.

const peers = [0, 1, 2].map((i) => forward(`kafka-${i}`, { controller: 9093 }));
const quorum = () => peers.map((p, i) => `${i}@${p.address.controller}`).join(',');

const brokers = peers.map((peer, i) =>
  defineService({
    name: peer,
    provision: { image: 'apache/kafka:3.8.0' },
    env: () => ({ KAFKA_NODE_ID: i, KAFKA_CONTROLLER_QUORUM_VOTERS: quorum() }),
  }),
);

Several images that share a base

"Three services install the same dependencies. I want to build that layer once and have all three start from it."

One multi-stage Dockerfile, one target per image. BuildKit builds the shared stage once and both images start from it. This example assumes a root npm lockfile containing both applications' dependencies, the two shown entrypoints, and an API listening on 0.0.0.0:8080. An npm workspace needs its workspace manifests copied before npm ci too.

# Dockerfile
FROM node:24 AS base
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci

FROM base AS api
COPY apps/api ./apps/api
CMD ["node", "apps/api/server.js"]

FROM base AS worker
COPY apps/worker ./apps/worker
CMD ["node", "apps/worker/main.js"]
const api = defineService({
  name: 'api',
  ports: { http: 8080 },
  provision: { image: { context: '.', dockerfile: 'Dockerfile', target: 'api' } },
});

const worker = defineService({
  name: 'worker',
  provision: { image: { context: '.', dockerfile: 'Dockerfile', target: 'worker' } },
});

There is no image-only node and no way for one node's image to reference another's, deliberately. Docker's own guidance is that this is the wrong problem to have: "In most cases you should just use a single multi-stage Dockerfile with multiple targets for similar behavior. This case is only recommended when you have multiple Dockerfiles that can't be easily merged into one."

When they genuinely cannot be merged — separate repositories vendored in, generated Dockerfiles — that is what docker buildx bake is for, with contexts = { base = "target:base" }. Drive it from a defineBuild and consume the resulting tag with provision: { image: 'acme/base:local' }. You lose the build graph for that edge, which is the honest cost of a case Docker itself calls rare.

Changing the graph by platform, environment or flag

"Different image on arm64." "No debugger in CI." "Skip the frontend today."

There is no feature for this. It is TypeScript.

const arch = process.arch === 'arm64' ? 'arm64' : 'amd64';
const ci = process.env.CI === 'true';

const worker = defineService({
  name: 'worker',
  provision: { image: `acme/worker:${arch}` },
});

// A falsy node is filtered out of the graph, so no spread dance is needed.
const devtools = !ci && defineService({ name: 'devtools', run: 'pnpm devtools' });

export default defineConfig({ name: 'acme', nodes: () => [worker, devtools] });

One dependency locally, another in CI

"Postgres is a container on my laptop and a service container in CI."

provision decides how a node comes to exist and never changes what it is, so downstream nodes are untouched.

const isCi = process.env.CI === 'true';

defineService({
  name: 'db',
  ports: { pg: 5432 },
  provision: isCi
    ? { adopt: { host: '127.0.0.1', port: { pg: 5432 } } }
    : { image: 'postgres:17' },
  env: { POSTGRES_PASSWORD: 'dev' },
  ready: { tcp: { on: 'pg' } },
});

Sharing one database across several worktrees

"I have four worktrees open with an agent in each and I do not want four Postgres containers. Let one own the database and have the others use it."

Every node is per-instance and there is no shared scope. The one sanctioned exception is provision.adopt: one instance runs the container, the others adopt the address. provision never changes what a node is, so nothing downstream moves.

const ownsDb = instance.isDefault;

const db = defineService({
  name: 'db',
  ports: { pg: { port: 5432, hostPort: 5432 } },
  provision: ownsDb
    ? { image: 'postgres:17' }
    : { adopt: { host: '127.0.0.1', port: { pg: 5432 } } },
  env: { POSTGRES_PASSWORD: 'dev' },
  ready: { tcp: { on: 'pg' } },
  outputs: ({ hostname, port }) => ({
    connectionString: `postgres://postgres:dev@${hostname}:${port.pg}/app_${instance.slug}`,
  }),
});

Start the owning instance first. The snippet selects a server and constructs a per-instance database name; it does not create that database. Gate each app on a task that creates its app_<instance.slug> database with the owner's credentials (quote the SQL identifier). This example assumes the owner uses the shown disposable dev password.

The borrowers' containers do not read 127.0.0.1. adopt.host is the outside name; inside the network the borrowed database is db-<id>.alzo.internal, reached through the gateway like any host-side target (one name per side of the boundary). That is what makes "nothing downstream moves" true rather than aspirational.

Three things carry the weight. hostPort must be pinned, because a borrower has to name a number that was not allocated for it — and the tension with per-instance nodes is the safety property: a second instance that tried to run Postgres fails loudly on the port instead of quietly starting a rival. Namespace the database, not the container, so the worktrees stay isolated where it matters. And accept the coupling out loud: the borrowers' data lives in a container the default instance owns, alzo down there takes it away, and declining to build reference counting for that is why there is no shared scope.

Two things that must never run at the same time

"Two codegen tasks write the same directory and corrupt each other. I need a lock — exclusive: 'codegen'."

There is no lock. Two nodes that must not run together already have a way to say so: put an edge between them. The edge is deliberately false — nothing flows along it — and that is fine, because dependsOn gates when a node may run and says nothing about what it reads.

const graphql = defineBuild({
  name: 'graphql',
  run: 'pnpm graphql-codegen',
  artifacts: ['./generated/graphql.ts'],
});

// `openapi` consumes nothing `graphql` produces. The edge is deliberately
// false: both write into ./generated, and running them together corrupts it.
const openapi = defineBuild({
  name: 'openapi',
  run: 'pnpm openapi-typescript',
  artifacts: ['./generated/openapi.ts'],
  dependsOn: [graphql.done],
});

An edge is stronger than a lock and cheaper to reason about: a lock gives mutual exclusion in an order nobody chose, so the failure it does not prevent is the interleaving-dependent one you cannot reproduce. An edge gives the same exclusion and a fixed order, shows up in alzo plan, and is a variable reference rather than a string exclusive: 'codgen' would misspell into a second, empty lock. Write the comment — an edge with no data behind it looks like a mistake to the next reader.

One image that runs several different roles

"Airflow ships one image that runs the scheduler, the workers and the API server. Do I need three Dockerfiles?"

provision.args is the whole answer. It is appended to the image's ENTRYPOINT — the Compose command: — so the roles are separate nodes with separate readiness, ordering and dashboard rows, off one image.

const IMAGE = 'apache/airflow:3.1.0';
const shared = { AIRFLOW__CORE__EXECUTOR: 'CeleryExecutor' };

const scheduler = defineService({
  name: 'scheduler',
  provision: { image: IMAGE, args: ['scheduler'] },
  env: shared,
  ready: { exec: 'airflow jobs check --job-type SchedulerJob', in: 'container' },
});

const apiServer = defineService({
  name: 'api-server',
  ports: { http: { port: 8080 } },
  provision: { image: IMAGE, args: ['api-server'] },
  env: shared,
  ready: { http: { path: '/api/v2/monitor/health', on: 'http' } },
});

Binding the image to a const matters more than it looks: the version is the thing that must not drift between roles, and it is now written once.

Narrowing what triggers a rebuild without narrowing the build context

"My Dockerfile copies a shared package, so the context has to be the repo root — but then a change anywhere rebuilds the image."

context and watch are separate fields and always were. One says what the builder may read; the other says what makes it run again.

const apiImage = defineService({
  name: 'api-image',
  ports: { http: { port: 8080 } },
  provision: {
    image: {
      context: '.', // the Dockerfile does `COPY packages/shared`
      dockerfile: 'apps/api/Dockerfile',
      watch: { paths: ['apps/api/**', 'packages/shared/**'], ignore: ['**/*.test.ts'] },
    },
  },
  ready: { http: { path: '/healthz', on: 'http' } },
});

If the only reason the context is wide is that one shared package is out of reach, narrow it instead: contexts gives the builder a second root without shipping the tree.

Sharing a base stack across repositories

"Three services in three repos all need the same Postgres and Redis. I want to write that once."

There is no extends and no include, because the language already has one. A shared stack is a module exporting a function that returns nodes; consuming it is import. It composes transitively, it is versioned by your package manager, and a rename in the shared module is a type error in every repo rather than a silent no-op.

// In @acme/dev-stack, imported here — a function, not exported node constants:
// nodes are created when the module is evaluated, so a bare `export const db`
// would be one node shared by every importer in the process.
const { db, redis } = devStack();

const api = defineService({
  name: 'api',
  ports: { http: {} },
  run: (self) => `pnpm dev --port ${self.port.http}`,
  env: () => ({ DATABASE_URL: db.outputs.connectionString({ database: 'acme' }), REDIS_URL: redis.url.r }),
  dependsOn: [db.available, redis.available],
});

The factory also gives the caller somewhere to pass an ingress or a flag when one repo needs the stack slightly differently.

Running the same graph with an extra slice of it

"I want dev plus the observability stack. Do I need a fourth profile that silently implies a third?"

No — and --profile a,b is deliberately not a thing. A profile is a named whole graph, so composing two would need a merge rule for conflicting settings, conflicting env and duplicate node names, and there is no such rule that is not a silent pick. What you want is a parameter, and the config is a program:

const graph = ({ observability = false } = {}) => {
  const db = defineService({
    name: 'db',
    ports: { pg: 5432 },
    provision: { image: 'postgres:17' },
    env: { POSTGRES_PASSWORD: 'dev' },
    ready: { tcp: { on: 'pg' } },
  });

  const collector = observability
    && defineService({ name: 'collector', provision: { image: 'grafana/alloy' } });

  return [db, collector];
};

export default defineConfig({
  name: 'acme',
  profiles: {
    dev: { description: 'Local development', default: true, nodes: () => graph() },
    devObs: { description: 'Local development with the collector', nodes: () => graph({ observability: true }) },
  },
});

dependsOn filters falsy and nodes accepts falsy, so const collector = flag && defineService(…) needs no spread and no conditional array. Every combination you can run stays listed by alzo profiles with a description — which is exactly what --profile a,b would take away, since nothing can enumerate or describe 2ⁿ combinations.

A duration that comes from the environment

"process.env.HEALTHCHECK_INTERVAL is a string, so I have to cast it to Duration — doesn't that throw away the validation?"

No. The cast gives up the compile-time check only, and that check was never available for an environment variable — its value is not knowable when the config is compiled. A load-time parser runs on every Duration and Size regardless of how the value arrived, because it had to: `${number}` accepts '30 s' with a space, so the brand was never sufficient on its own. A bad value fails loudly as config.badDuration, naming the field and the node and quoting what it found.

const db = defineService({
  name: 'db',
  ports: { pg: 5432 },
  provision: { image: 'postgres:17' },
  env: { POSTGRES_PASSWORD: 'dev' },
  ready: {
    tcp: { on: 'pg' },
    // The `??` goes outside the cast: a defaulted value is still validated,
    // and `exactOptionalPropertyTypes` rejects the undefined otherwise.
    period: (process.env.HEALTHCHECK_INTERVAL ?? '2s') as Duration,
    failureThreshold: 60,
  },
});

There is deliberately no duration() helper. It would only reword an error we already produce.

An environment variable that should only be set if it exists

"Compose lets me write DISPLAY: with no value and it passes the host's through only when it is set. How do I do that?"

You write it, because the config is a program. Compose's valueless form removes the key entirely when the variable is unset — four lines of TypeScript, and unlike Compose you can also give it a default, which the valueless form cannot express:

const passThrough = (...keys: string[]) =>
  Object.fromEntries(
    keys.map((k) => [k, process.env[k]]).filter(([, v]) => v !== undefined),
  ) as Record<string, string>;

const gui = defineService({
  name: 'gui',
  provision: { image: 'ghcr.io/acme/gui' },
  env: { ...passThrough('DISPLAY', 'WAYLAND_DISPLAY'), TZ: process.env.TZ ?? 'UTC' },
});

The neighbouring request is worth knowing about because it is answered the same way. Compose's most-reacted env issue asks for $(command) substitution — 300+ reactions — and every case in it is a host lookup: id -u, git describe, stat -c %g, the host IP. Those are node:child_process and, for the first one, user: 'current'.

A workspace-level action, with no node to hang it on

"I want a 'reset everything' button. defineInfo has no commands."

Correct, and deliberately so. A panel has no process, so a button on it would have no logs, no ordering and no state cell. A workspace action is a task nobody runs automatically:

const resetAll = defineTask({
  name: 'reset-all',
  run: 'pnpm db:drop && pnpm db:create && pnpm migrate && pnpm seed',
  start: 'manual',
});

List resetAll in the config's nodes roots and declare any runtime dependencies its commands need. Start those dependencies with alzo up <dependency> --wait, then use alzo run reset-all. run verifies dependencies; it does not start them. To start a task and its dependency closure together, use alzo up reset-all --wait instead; that already executes the task, so do not follow it with a second run. The dashboard exposes the manual task as a row with a Start action.

"My dev server's address on the dashboard is plain text, not a link I can click."

Alzo links only a port it knows speaks HTTP. A port number says nothing about its protocol: pg: 5432 and http: 3000 look the same to Alzo, and linking PostgreSQL's port offered the browser a URL it could not use. An ingress route is HTTP by definition. Otherwise, say which port answers HTTP with the readiness probe, which also makes "ready" mean answering requests rather than an open port. Give it a path that answers 2xx: a redirect or a 404 fails the probe, and the node never becomes ready:

const web = defineService({
  name: 'web',
  ports: { http: {} },
  run: (self) => `pnpm dev --port ${self.port.http}`,
  ready: { http: { path: '/', on: 'http' } },
});

The terminal row and alzo status then show its http:// URL as well, and alzo status --json marks it speaksHttp: true.

Attaching a debugger

"How do I run one service under the inspector without a separate config?"

One typed runtime parameter, a ternary, and a pinned port — no debug field, and no language-aware entrypoint rewriting:

const debug = param('debug', {
  type: 'boolean',
  default: false,
  description: 'Start the API under the Node inspector',
});

const api = defineService({
  name: 'api',
  provision: { image: { context: './apps/api' }, args: debug
    ? ['node', '--inspect-brk=0.0.0.0:9229', 'server.js']
    : ['node', 'server.js'] },
  ports: {
    http: { port: 3000, ingress: local },
    inspect: { port: 9229, hostPort: 9229, internal: true },
  },
  // A paused process is not an unhealthy one. Widen the budget; do not remove the probe.
  ready: { http: { path: '/healthz', on: 'http' }, failureThreshold: debug ? 600 : 3 },
});

Run alzo up --debug, then attach to localhost:9229. alzo up --help discovers the switch from this config, and alzo plan --debug shows the resolved value and changed entrypoint before anything starts. Parameters are printed in those surfaces, so a credential belongs in secret(), never here.

The failureThreshold line is the part people miss, and it is why this is a pattern rather than a one-liner. Readiness keeps polling after a node goes available, so a process stopped at a breakpoint fails its probe and reports node.unhealthy — a loud, specific, wrong alarm for a node that is fine. Under --inspect-brk it is worse: the process does not listen until you attach, so the node never becomes ready and blocks every dependent. Skaffold reaches the same conclusion and states the fix as a number: its debug mode raises probe timeouts to 600 seconds from a default of 1.

One caveat from Principle 4. hostPort: 9229 is exclusive across instances, so a committed launch.json debugs one worktree. A second worktree reads its allocated port from alzo instances --json.

Proving a node makes no outbound calls

"I want to run a worker — or a build tool, or a dependency I did not write — and be sure it cannot phone home."

One field, on a node with no ports:

const scanner = defineService({
  name: 'scanner',
  provision: { image: 'ghcr.io/acme/third-party-scanner' },
  dependsOn: [db.available],
  env: () => ({ DATABASE_URL: db.outputs.connectionString({ database: 'acme' }) }),
  egress: false,
});

scanner sits on the instance's --internal network alone: it resolves and reaches every other node by name, it has no default route, and its DNS gets SERVFAIL rather than an answer it cannot use. The cut is in both directions and needs no firewall rule, no networks: block and no second config.

The constraint that surprises people: it cannot have ports. Every port Alzo allocates is bound on your machine, always — that is where tcp and http readiness probes run from — and Docker cannot bind a host port into an --internal network. Declaring both is a load error naming each, rather than a container that starts with ports which quietly do nothing. So this is for the nodes nothing on the host dials: workers, consumers, one-shot tasks.

If what you actually want is to watch a service degrade offline while you drive it from the host, that is not this field, and it is not available today.

On this page