- JavaScript 99.4%
- Dockerfile 0.5%
- Shell 0.1%
| app-inspect.test.js | ||
| compose-redact.js | ||
| compose-service-discovery.test.js | ||
| deploy-compose | ||
| docker-compose.yml | ||
| Dockerfile | ||
| kua.json | ||
| NOTES-image-digest-pinning.md | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| registry-diff.js | ||
| registry-diff.test.js | ||
| server.js | ||
| service-proxy.test.js | ||
kua-deploy
Authoritative deploy orchestrator for the Kua infrastructure fleet. Receives release triggers (admin API and Forgejo webhooks), runs git-pull → migration gate → docker build → recreate → SHA-verify on managed apps.
Split out of coder-core/services/kua-deploy/ on 2026-05-21 to break the self-rebuild loop that ran every coder-core release through this service as a side-effect.
Layout
server.js— Fastify app exposing/api/v1/apps/:app/deploy,/progress,/runtime-status,/webhook/forgejo.Dockerfile— node:22-alpine + docker-cli + ssh + git + kua-vault binary (mounted at runtime).docker-compose.yml— single-service compose project. Joinskua-services+production_proxynetworks.deploy-compose— mandatory production compose wrapper; injectskua-deploy/prodfrom kua-vault.kua.json— release-app manifest (mode: direct,server: sol-prod).NOTES-image-digest-pinning.md— design notes for deferred prevention #4.
Registry
The registry is engine-owned persistent state at /app/data/registry.json on the
kua-services_kua-deploy-data volume. A fresh volume may seed from the image,
but Git is not the runtime source of truth.
Deploying kua-deploy
Via release-app:
release-app kua-deploy
Which goes through kua-deploy's own admin POST /api/v1/apps/kua-deploy/deploy and uses the transient-container recreate pattern (Phase A) so the service can replace its own running container without false-success.
For direct operator compose commands, always use the vault wrapper:
./deploy-compose build
./deploy-compose up -d --force-recreate
The compose file requires both the admin token and scoped-token JSON, so a plain
docker compose up fails during interpolation before it can replace the healthy
container with an unauthenticated/degraded one. A plain docker restart kua-deploy is safe because Docker retains the environment baked into the
existing container.
See also
services/kua-deploy/NOTES-image-digest-pinning.mdin this repoinfra-docs/docs/04-operations/deploy-listener.mdin coder-core (current-state callout + deploy_mode reference)