Skip to content

Deployment

Production layout is documented in domains.md. This guide is the operator checklist.

Prerequisites

  • Cloudflare: Workers, Pages, R2 bucket cepatedge
  • Neon production database + connection string
  • Custom domains on .cepatedge.com subdomains (see domains doc)

1. Secrets and bindings

Worker (apps/worker):

bash
wrangler secret put DATABASE_URL
wrangler secret put JWT_SECRET

Confirm wrangler.jsonc binds CEPATEDGE_STORAGE → bucket cepatedge.

2. Database

bash
pnpm worker:db:push

3. Deploy surfaces

From repository root:

bash
pnpm worker:deploy    # api.cepatedge.com
pnpm landing:deploy   # cepatedge.com
pnpm web:deploy       # app.cepatedge.com
pnpm docs:deploy      # docs.cepatedge.com
pnpm git:deploy       # git.cepatedge.com

Or full build gate:

bash
pnpm build

4. Custom domains (Cloudflare dashboard)

Pages / Worker projectCustom domain
cepatedgecepatedge.com
app-cepatedgeapp.cepatedge.com
docs-cepatedgedocs.cepatedge.com
git-cepatedgegit.cepatedge.com
Worker cepatedge-apiapi.cepatedge.com

Enable automatic *.pages.dev → custom domain redirect in Pages settings.

5. Smoke tests

bash
curl -sf https://api.cepatedge.com/health
curl -sfI https://cepatedge.com
curl -sfI https://app.cepatedge.com
curl -sfI https://docs.cepatedge.com

Log in on app.cepatedge.com and confirm session persists (cookie domain .cepatedge.com).

Monitoring

  • Worker logs: Cloudflare dashboard → Workers → Observability
  • Internal logs / audit: product app → System (requires logs.read / audit.read)
  • Runbook: runbook.md