deployment
Cloudflare Workers and Pages deployment with integrated debugging and troubleshooting chains
View on GitHubTable of content
Cloudflare Workers and Pages deployment with integrated debugging and troubleshooting chains
Installation
npx claude-plugins install @greyhaven-ai/grey-haven-plugins/deployment
Contents
Folders: commands, hooks, skills
Included Skills
This plugin includes 1 skill definition:
deployment-cloudflare
Deploy TanStack Start applications to Cloudflare Workers/Pages with GitHub Actions, Doppler, Wrangler, database migrations, and rollback procedures. Use when deploying Grey Haven applications.
View skill definition
Grey Haven Cloudflare Deployment
Deploy TanStack Start applications to Cloudflare Workers using GitHub Actions, Doppler for secrets, and Wrangler CLI.
Deployment Architecture
TanStack Start on Cloudflare Workers
- SSR: Server-side rendering with TanStack Start server functions
- Edge Runtime: Global deployment on Cloudflare’s edge network
- Database: PostgreSQL (PlanetScale) with connection pooling
- Cache: Cloudflare KV for sessions, R2 for file uploads
- Secrets: Managed via Doppler, injected in GitHub Actions
Core Infrastructure
- Workers: Edge compute (TanStack Start)
- KV Storage: Session management
- R2 Storage: File uploads and assets
- D1 Database: Edge data (optional)
- Queues: Background jobs (optional)
Wrangler Configuration
Basic wrangler.toml
name = "grey-haven-app"
main = "dist/server/index.js"
compatibility_date = "2025-01-15"
node_compat = true
[vars]
ENVIRONMENT = "production"
DATABASE_POOL_MIN = "2"
DATABASE_POOL_MAX = "10"
# KV namespace for session storage
[[kv_namespaces]]
binding = "SESSIONS"
id = "your-kv-namespace-id"
preview_id = "your-preview-kv-namespace-id"
# R2 bucket for file uploads
[[r2_buckets]]
binding = "UPLOADS"
bucket_name = "grey-haven-uploads"
preview_bucket_name = "grey-haven-uploads-preview"
# Routes
routes = [
{ pattern = "app.greyhaven.studio", zone_name = "greyhaven.studio" }
]
Environment-Specific Configs
- Development: `wrangler.toml
…(truncated)