Skip to content

Cuti-E Deployment

Environments

Environment Worker Database Domain
Production cutie-worker cutie-production (D1) api.cuti-e.com
Sandbox cutie-worker-sandbox cutie-sandbox (D1) cutie-worker-sandbox.invotekas.workers.dev

Automatic Deployment

Workers are auto-deployed via GitHub Actions when changes are pushed to cloudflare-worker/:

flowchart LR
    push["Push to main"] --> ci["CI Tests"]
    ci --> sandbox["Deploy Sandbox"]
    sandbox --> health["Health Check"]
    health --> prod["Deploy Production"]
Event Sandbox Production
PR created Tests run --
PR merged to main Auto-deploy Auto-deploy

Manual Deployment

cd cloudflare-worker

# Deploy to sandbox
wrangler deploy --env sandbox

# Deploy to production
wrangler deploy --env production

Secrets

wrangler secret put DEVICE_SALT --env production
wrangler secret put JWT_SECRET --env production

D1 Migrations

Migrations in cloudflare-worker/migrations/ are automatically applied during CI/CD deployment.

# Manual migration
wrangler d1 migrations apply cutie-production
wrangler d1 migrations apply cutie-sandbox

Website Deployment

The marketing website deploys to Cloudflare Pages on push to website/:

Property Value
Project cuti-e
Domain cuti-e.com
Source website/ directory
Trigger Push to main on website/** paths

iOS SDK Release

After making changes to the SDK (ios/ folder), release to the public repo:

cd ios
./release-public.sh 1.0.73  # Replace with new version number

This copies updated files to cuti-e/ios-sdk, commits, and creates a version tag.

Deployment Monitoring

# Check latest deployment
gh run list --limit 5

# If deployment fails
gh run view <run-id> --log-failed

Pricing & Infrastructure Cost

Tier Price Feedback/Month
Free $0 50
Starter $9/mo 500
Pro $39/mo 10,000
Business $99/mo Unlimited

Infrastructure cost is approximately $5/month for 10,000 feedback items (85% profit margin on Pro tier).