Skip to content

Cloudflare Workers deployment

Proxy and Admin are separate Worker projects sharing one D1 database (binding commonly DB).

  1. Create D1 and copy Database ID.
  2. Replace placeholder database_id in all three wrangler config locations.
  3. npm install + npm run db:migrate:remote from repo root (or CI equivalent).
  4. Deploy Proxy from packages/proxy with wrangler deploy.
  5. Deploy Admin from packages/admin via npm run build:cf + wrangler deploy.
  6. Store ADMIN_PASSWORD (and similar) as Secrets, not in Git.
  7. Attach HTTPS hostnames; align GATEWAY_URL / GATEWAY_MASTER_URL in downstream systems.
  8. Smoke test /health, Admin login, and a chat call with a test key (Quick start).
  • Edge + less metal → Cloudflare.
  • Strict VPC / BYO DBDocker.