Deployment
This guide covers deploying the booking platform to production using Cloudflare Workers via Wrangler.
Overview
The booking platform deploys to Cloudflare Workers for edge-first performance. Each app and integration has its own Worker with dedicated wrangler.jsonc configuration.
Prerequisites
- Bun >= 1.3.0
- Wrangler CLI (installed via catalog)
- Cloudflare account with Workers enabled
CLOUDFLARE_API_TOKENenvironment variable set
Workers
| Worker | Workspace | Entry Point | Description |
|---|---|---|---|
| booking-website | apps/website | apps/website/.output/server/index.ts | Main web app with SSR |
| booking-admin | apps/admin | apps/admin/.output/server/index.ts | Admin dashboard |
| booking-docs | docs | docs/.vitepress/dist | VitePress documentation site |
Deploy Commands
Deploy Website
bash
bun run --cwd apps/website deployDeploy Admin
bash
bun run --cwd apps/admin deployDeploy Docs
bash
bun run build:docs
bun run --cwd docs deployConfiguration
Each workspace has a wrangler.jsonc file with:
name: Worker namemain: Entry point pathcompatibility_date: Runtime compatibility datevars: Environment variablesd1_databases: D1 database bindings (if used)kv_namespaces: KV namespace bindings (if used)
Environment Variables
Set the following secrets via Wrangler:
bash
wrangler secret put SUPABASE_URL
wrangler secret put SUPABASE_SERVICE_KEY
wrangler secret put STRIPE_SECRET_KEY
wrangler secret put OPENAI_API_KEY
wrangler secret put RESEND_API_KEY
wrangler secret put REDIS_URLDatabase Migrations
Run Drizzle migrations before deploying:
bash
bun run --cwd packages/database drizzle-kit migrateCI/CD
The project uses GitHub Actions for CI/CD. See .github/workflows/ for pipeline configuration. The verify task runs check, test, and build before any deployment.
Rollback
Cloudflare Workers supports instant rollback via the dashboard or Wrangler:
bash
wrangler deployments rollbackMonitoring
- Cloudflare Analytics: Worker metrics, CPU time, requests
- Health endpoint:
/.healthon each Worker - Error tracking: Sentry integration via
packages/infrastructure