clawhub/docs/deploy.md
2026-01-07 18:28:51 +01:00

1.5 KiB
Raw Permalink Blame History

summary read_when
Deploy checklist: Convex backend + Vercel web app + /api rewrites.
Shipping to production
Debugging /api routing

Deploy

ClawdHub is two deployables:

  • Web app (TanStack Start) → typically Vercel.
  • Convex backend → Convex deployment (serves /api/... routes).

1) Deploy Convex

From your local machine:

bunx convex deploy

Ensure Convex env is set (auth + embeddings):

  • AUTH_GITHUB_ID
  • AUTH_GITHUB_SECRET
  • CONVEX_SITE_URL
  • JWT_PRIVATE_KEY
  • JWKS
  • OPENAI_API_KEY
  • SITE_URL (your web app URL)
  • Optional webhook env (see docs/webhook.md)

2) Deploy web app (Vercel)

Set env vars:

  • VITE_CONVEX_URL
  • VITE_CONVEX_SITE_URL (Convex “site” URL)
  • CONVEX_SITE_URL (same value; used by auth provider config)
  • SITE_URL (web app URL)

3) Route /api/* to Convex

This repo currently uses vercel.json rewrites:

  • source: /api/:path*
  • destination: https://<deployment>.convex.site/api/:path*

For self-host:

  • update vercel.json to your deployments Convex site URL.

4) Registry discovery

The CLI can discover the API base from:

  • /.well-known/clawdhub.json

If you dont serve that file, users must set:

export CLAWDHUB_REGISTRY=https://your-site.example

5) Post-deploy checks

curl -i "https://<site>/api/v1/search?q=test"
curl -i "https://<site>/api/v1/skills/gifgrep"

Then:

clawdhub login --site https://<site>
clawdhub whoami