Deployment
Docker Compose
Two compose files describe the stack:
docker-compose.yml— the playground + two registriesdocker-compose.full.yml— an overlay adding the control plane, its Postgresdb, and the UI console (run together viamake up-full)
The playground image builds with context: . (this repo) — the acdp SDK
installs from PyPI, so no sibling checkout is needed. The registry / control
plane / UI images each build from their own sibling repo context
(acdp-registry-rs/, acdp-control-plane/, acdp-ui-console/).
Services and ports
| Service | Repo | Port | Public | Compose file |
|---|---|---|---|---|
playground | acdp-playground | 8000 | yes | base |
registry-a | acdp-registry-rs | 8100 | no | base |
registry-b | acdp-registry-rs | 8200 | no | base |
db (Postgres) | — | (internal) | no | full |
control-plane | acdp-control-plane | 3001 | no | full |
ui-console | acdp-ui-console | 3000 | yes | full |
The ui-console is a production build, so it gates its backend proxy
(/api/proxy/*, /api/stream/*) behind an operator passphrase and answers
503 when none is configured. The full overlay sets
ACDP_UI_CONSOLE_PASSWORD: ${ACDP_UI_CONSOLE_PASSWORD:-playground-console}:
sign in at http://localhost:3000/login with playground-console, or export
your own value (or set it in .env) before make up-full. Use a high-entropy
passphrase if the stack is reachable beyond localhost. The console owns this
gate; see its
README.
The registries store to an ephemeral SQLite db on a tmpfs mount, so state
resets on restart. The full overlay provisions an ephemeral db Postgres
service (also tmpfs) that the control plane requires; what the CP persists
there and how it migrates is CP-owned (see the control plane's
ARCHITECTURE.md).
Registry config (config/registry-a.toml, -b.toml)
These are demo configs for the registry binary — the registry owns the config schema (see its CONFIGURATION.md). The playground-relevant choices in them are:
authority/port—registry-a.playground.local:8100,registry-b.playground.local:8200cross_registry_resolution = true— lets S5 route an edge across registriesauth.enabled = truewithdid_methods = ["did:web", "did:key"]— auth is on so S6 can run the challenge/token flow;anonymous_public_reads = trueandrequire_tenant = falsekeep the token-less scenarios (public reads, unbound producer-signed publishes) working- registry-a runs the receipts, head-receipt, lifecycle and transparency-log profiles — the S22/S24/S27 receipt scenarios and the S28–S31 lifecycle/log/witness scenarios target it; registry-b stays plain core+discovery. What those profiles commit the registry to is registry-owned — see its RECEIPTS.md
- registry-a's
[playground] pinned_only = true— a receipts-advertising registry must verify every publish, so the unverified fallback is closed: a publish must carry a verifieddid:keysignature or match a currently-valid pinned key. That is why nearly every publishing scenario usesdid:key; the pinneddid:webidentities are the exceptions —rotating-publisher(the key-rotation windows S12 demonstrates),rotating-historical(the stable identity S24 publishes under) andp256-publisher webhook.enabled = false— the registry's SSRF policy refuses the loopbackhttp://playground:8000target in the demo (webhook-driven events are exercised in the unit suite instead)
The [[playground.pinned_keys]] entries also demonstrate key rotation (the
rotating-publisher agent has overlapping old/new Ed25519 windows, plus a
p256-publisher P-256 key). scripts/pinned_keys_diff.py translates these into
the control plane's CONTROL_PLANE_PINNED_KEYS wire format.
Secrets that must line up
| Secret | Shared between |
|---|---|
WEBHOOK_SECRET | registries ↔ playground (inbound webhook HMAC) |
CONTROL_PLANE_HMAC_SECRET / CP WEBHOOK_SECRET | playground ↔ control plane (forwarded webhook HMAC) |
CONTROL_PLANE_ADMIN_TOKEN / CP AUTH_ADMIN_API_KEYS | playground ↔ control plane (admin surface) |
The Dockerfile
python:3.12-slim base. Installs uv, copies this repo, runs
uv sync --frozen --extra llm (which pulls the acdp wheel from PyPI — no Rust
toolchain), exposes 8000, and launches:
uv run --no-sync uvicorn playground.main:app --host "${HOST:-0.0.0.0}" --port "${PORT:-8000}"--no-sync skips a redundant re-resolve at boot (the image is pre-built);
exec hands signals to uvicorn for graceful shutdown; HOST/PORT are dynamic
for Railway.
Live auth caveat
For a did:web agent, the registry verifies challenge signatures by resolving
the agent's DID document. The playground's *.playground.local DIDs aren't
web-hosted and per-run keys change every run, so token issuance for a per-run
did:web agent can't complete against a stock registry. Of the
token-issuing scenarios that affects S10 only: it
degrades gracefully and its
deterministic core is validated by the unit suite. S6 and S11 use
self-certifying did:key agents (the registry verifies the key embedded in the
DID, no fetch) and complete live. The pinned did:web identities above publish
because their keys are pinned, not resolved. Running the registry itself
(admin endpoints, migrations, rate limits, version-to-version changes) is
covered by its
OPERATIONS.md
and UPGRADING.md.
Railway
.github/workflows/deploy-images.yml builds this repo's playground image and
pushes it to ghcr.io/<owner>/acdp-playground on every merge to main, on a
v* tag, or on manual dispatch (the acdp SDK comes from PyPI, so no sibling
checkout is required). Production redeploys automatically on merge: after a
push to main the workflow runs railway redeploy --from-source --service acdp-playground,
authenticated by the RAILWAY_TOKEN repo secret (a project token for the
acdp-runner project's production environment). The other
stack images are published by their own repos to
ghcr.io/<owner>/acdp-{registry,control-plane,ui-console}. The playground image
binds Railway's dynamic $PORT/$HOST.
Production secrets and config come from Doppler (acdp-playground,
acdp-registry-a, acdp-registry-b, config prd) through
deploy/doppler-sync.sh <service> [--apply].
Railway keeps only its own system variables and ${{...}} references. See
Configuration → Doppler.
Full deploy guide: railway/DEPLOY.md — service
topology, IPv6 private networking, per-service env vars, and the shared-secret
wiring. Key points:
- Each repo owns its own ghcr image (tag-triggered).
- Set IPv6 binds for
.railway.internalreachability:HOST=::(playground, CP),HOSTNAME=::(ui-console),ACDP_REGISTRY_REGISTRY__BIND=::(registries). - Give each service a deterministic internal port and wire the shared secrets above across services.
CI/CD
| Workflow | Trigger | What it does |
|---|---|---|
ci.yml | push to main / PR / workflow_dispatch / weekly schedule | test: ruff check + ruff format --check, the offline unit suite with an 80% coverage gate on Python 3.12 + 3.13, smoke test (every trigger except the schedule); docker: PRs build the playground image (no push); live: conformance on manual workflow_dispatch or the weekly schedule (boots registry-a + control-plane, uploads compose logs on failure). See What CI runs |
deploy-images.yml | push to main / v* tag / dispatch | Build + push the playground image only to ghcr.io/<owner>/acdp-playground (latest + the tag, or sha-<short> on main). On a push to main it then redeploys the prod Railway acdp-playground service (RAILWAY_TOKEN secret). Every other stack image is published by its own repo |
auto-merge.yml | every PR | Calls the shared acdp-ci auto-merge workflow, which arms GitHub auto-merge for patch/minor Dependabot PRs once required checks pass (it never bypasses CI) |
bump-acdp.yml | repository_dispatch acdp-released / dispatch | Calls the shared acdp-ci bump-consume.yml to open a uv.lock bump PR for a new acdp release — see SDK bumps |
notify-website.yml | push to main touching docs/** or README.md, or dispatch | Dispatch a docs-updated event to acdp-website |
.railway/railway.ts
The prod acdp-playground service is defined as Railway Infrastructure as Code
in .railway/railway.ts, the acdp-playground partial of the acdp-runner
project. It deploys the ghcr.io/agentcontextdistributionprotocol/acdp-playground:latest
image on one us-west2 replica. The file mirrors the live service and never
reads or writes its variables. deploy-images.yml still triggers deploys.
To change the service, edit the file and preview the change before applying it
(Railway CLI 5.x, after npm ci at the repo root for the railway SDK):
railway config plan # an unchanged file reports "already up to date"
railway config applyThe old railway.json (Config as Code, deprecated, stops applying on
2026-12-01) was removed. It never applied to this image-sourced service, so its
Dockerfile build, /healthz healthcheck and restart settings were never in
effect. The IaC file now sets the health check (/healthz, 120 s timeout) and
the restart policy (ON_FAILURE, 10 retries); the Dockerfile build does not
apply, since the service deploys a prebuilt image.