Deployment & Operasi
Deploy API (Cloudflare Workers)
Section titled “Deploy API (Cloudflare Workers)”cd apps/apicorepack yarn build # Vite SSR → dist/server/index.mjsnpx wrangler deploy # → klola.treonstudio.workers.devDeploy Web (Cloudflare Pages)
Section titled “Deploy Web (Cloudflare Pages)”cd apps/webnpx @cloudflare/next-on-pagesnpx wrangler pages deploy .vercel/output/static --project-name=klola-webDeploy Docs (site ini)
Section titled “Deploy Docs (site ini)”cd docs/sitecorepack yarn build # Starlight → dist/npx wrangler pages deploy dist --project-name=klola-docs --branch=mainDatabase migration
Section titled “Database migration”cd apps/apiyarn workspace @treonstudio/klola-api db:migrateStaging
Section titled “Staging”cd apps/apinpx wrangler deploy --config ./wrangler.staging.tomlStaging memakai konfigurasi production (NODE_ENV=production,
MIDTRANS_IS_PRODUCTION=true) dengan secrets sendiri: DATABASE_URL,
MIDTRANS_SERVER_KEY, dll.
Operasi
Section titled “Operasi”| Aspek | Nilai |
|---|---|
| Cron | */5 * * * * (sync-command-queue, outbox scheduler) |
| Health | GET /api/v1/health |
| Logs | wrangler tail klola |
| Observability | Structured logger (@klola/observability) + PostHog sink |