Deployment

Docker Compose

Two compose files describe the stack:

  • docker-compose.yml — the playground + two registries
  • docker-compose.full.yml — an overlay adding the control plane, its Postgres db, and the UI console (run together via make 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

ServiceRepoPortPublicCompose file
playgroundacdp-playground8000yesbase
registry-aacdp-registry-rs8100nobase
registry-bacdp-registry-rs8200nobase
db (Postgres)—(internal)nofull
control-planeacdp-control-plane3001nofull
ui-consoleacdp-ui-console3000yesfull

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:8200
  • cross_registry_resolution = true — lets S5 route an edge across registries
  • auth.enabled = true with did_methods = ["did:web", "did:key"] — auth is on so S6 can run the challenge/token flow; anonymous_public_reads = true and require_tenant = false keep 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 verified did:key signature or match a currently-valid pinned key. That is why nearly every publishing scenario uses did:key; the pinned did:web identities are the exceptions — rotating-publisher (the key-rotation windows S12 demonstrates), rotating-historical (the stable identity S24 publishes under) and p256-publisher
  • webhook.enabled = false — the registry's SSRF policy refuses the loopback http://playground:8000 target 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

SecretShared between
WEBHOOK_SECRETregistries ↔ playground (inbound webhook HMAC)
CONTROL_PLANE_HMAC_SECRET / CP WEBHOOK_SECRETplayground ↔ control plane (forwarded webhook HMAC)
CONTROL_PLANE_ADMIN_TOKEN / CP AUTH_ADMIN_API_KEYSplayground ↔ 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.internal reachability: 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

WorkflowTriggerWhat it does
ci.ymlpush to main / PR / workflow_dispatch / weekly scheduletest: 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.ymlpush to main / v* tag / dispatchBuild + 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.ymlevery PRCalls 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.ymlrepository_dispatch acdp-released / dispatchCalls the shared acdp-ci bump-consume.yml to open a uv.lock bump PR for a new acdp release — see SDK bumps
notify-website.ymlpush to main touching docs/** or README.md, or dispatchDispatch 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 apply

The 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.