Deployment
Docker
Docker Compose for local Postgres, executor image, and control plane on port 8090.
Docker simplifies local Postgres and provides the foundation for production executor images.
Local Postgres (compose)
docker compose up -d
export DATABASE_URL=postgres://yoke:yoke@localhost:5432/yoke
export YOKE_STORAGE=pg_sqliteA typical docker-compose.yml provides Postgres 16 with yoke user/database.
Run runtime locally (no Docker for binary)
yoke dev ./your-package \
--database "$DATABASE_URL" \
--storage pg_sqliteControl plane
yoke control-plane \
--database "$DATABASE_URL" \
--port 8090Control plane defaults to port 8090 (YOKE_CONTROL_PLANE_PORT). Executor portal HTTP defaults to 8080. Do not confuse them — the control plane serves conversation and tenant APIs; the executor serves portal routes and /health.
Multi-tenant Docker sandbox
The Docker sandbox provider runs the yoke-executor OCI image per hot tenant:
TenantSchedulerService
→ DockerSandbox.provision()
→ container with YOKE_TENANT_ID, DATABASE_URL, YOKE_PACKAGE_REF
→ executor boots user packageStop when idle: no pending events and no active dispatch.
Executor image contents
Standard image includes:
- Rust
yoke-executorbinary - libdeno embedded runtime
- Embedded Deno worker project
- No user package baked in — mounted or fetched via
YOKE_PACKAGE_REF
Example compose layout (conceptual)
services:
postgres:
image: postgres:16
environment:
POSTGRES_USER: yoke
POSTGRES_PASSWORD: yoke
POSTGRES_DB: yoke
ports:
- "5432:5432"
control-plane:
build: .
command: yoke control-plane --database postgres://yoke:yoke@postgres:5432/yoke --port 8090
ports:
- "8090:8090"
depends_on:
- postgres
# Executor containers spawned dynamically by scheduler — not static in composeEnvironment in containers
ENV DATABASE_URL=postgres://yoke:yoke@postgres:5432/yoke
ENV YOKE_STORAGE=pg_sqlite
# or for hosted:
ENV YOKE_STORAGE=s3
ENV YOKE_S3_BUCKET=my-bucket
ENV YOKE_TENANT_ID=defaultVolume mounts
| Mount | Purpose |
|---|---|
./your-package:/package | Dev package hot-reload (requires restart) |
| S3 / object storage | Production package refs |
Health checks
Configure Docker/orchestrator health checks against executor portal:
GET http://localhost:8080/health