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.comsubdomains (see domains doc)
1. Secrets and bindings
Worker (apps/worker):
bash
wrangler secret put DATABASE_URL
wrangler secret put JWT_SECRETConfirm wrangler.jsonc binds CEPATEDGE_STORAGE → bucket cepatedge.
2. Database
bash
pnpm worker:db:push3. 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.comOr full build gate:
bash
pnpm build4. Custom domains (Cloudflare dashboard)
| Pages / Worker project | Custom domain |
|---|---|
cepatedge | cepatedge.com |
app-cepatedge | app.cepatedge.com |
docs-cepatedge | docs.cepatedge.com |
git-cepatedge | git.cepatedge.com |
Worker cepatedge-api | api.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.comLog 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