-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.toml.example
More file actions
87 lines (77 loc) · 2.97 KB
/
wrangler.toml.example
File metadata and controls
87 lines (77 loc) · 2.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Cloudflare Durable Object Manager - Wrangler Configuration Template
# Copy this file to wrangler.toml and customize for your Cloudflare account
#
# NOTE: This is the PRODUCTION configuration.
# For local development, use wrangler.dev.toml instead.
name = "do-manager"
main = "worker/index.ts"
compatibility_date = "2025-01-01"
compatibility_flags = ["nodejs_compat"]
# Smart Placement disabled for SPA - UI responsiveness priority
placement = { mode = "off" }
[build]
command = "npm run build"
cwd = "."
[assets]
directory = "dist"
binding = "ASSETS"
# ============================================
# D1 METADATA DATABASE CONFIGURATION
# ============================================
# This database stores namespace configs, instance tracking, and job history
# Create database: wrangler d1 create do-manager-metadata
# Then run: wrangler d1 execute do-manager-metadata --remote --file=worker/schema.sql
[[d1_databases]]
binding = "METADATA"
database_name = "do-manager-metadata" # CHANGE THIS
database_id = "your-metadata-database-id" # CHANGE THIS (from wrangler d1 create output)
# ============================================
# R2 BACKUP BUCKET (OPTIONAL)
# ============================================
# For backing up Durable Object state snapshots
# Create with: wrangler r2 bucket create do-manager-backups
[[r2_buckets]]
binding = "BACKUP_BUCKET"
bucket_name = "do-manager-backups"
[observability.logs]
enabled = true
# ============================================
# CUSTOM DOMAIN ROUTING (OPTIONAL)
# ============================================
# Option 1: Use default Workers.dev subdomain (no configuration needed)
# Your worker will be available at: https://do-manager.<your-subdomain>.workers.dev
#
# Option 2: Use custom domain (uncomment and configure below)
# Requirements:
# - Domain must be added to your Cloudflare account
# - DNS must be managed by Cloudflare
#
# [[routes]]
# pattern = "your-subdomain.your-domain.com" # CHANGE THIS
# custom_domain = true
# zone_name = "your-domain.com" # CHANGE THIS
# ============================================
# REQUIRED SECRETS (Set via CLI)
# ============================================
# Run these commands to set your secrets:
#
# wrangler secret put ACCOUNT_ID
# wrangler secret put API_KEY
# wrangler secret put TEAM_DOMAIN
# wrangler secret put POLICY_AUD
#
# Secret details:
# - ACCOUNT_ID: Your Cloudflare account ID (Dashboard > Overview)
# - API_KEY: Cloudflare API token with Workers Scripts Read permission
# - TEAM_DOMAIN: Cloudflare Zero Trust team domain (e.g., yourteam.cloudflareaccess.com)
# - POLICY_AUD: Access Policy AUD tag from your Access application
#
# ============================================
# LOCAL DEVELOPMENT
# ============================================
# For local development, use wrangler.dev.toml instead of this file.
# See README.md "Local Development" section for instructions.
#
# Quick start:
# Terminal 1: npm run dev
# Terminal 2: npx wrangler dev --config wrangler.dev.toml --local