canvas-website/wrangler.toml

84 lines
2.1 KiB
TOML

main = "worker/worker.ts"
compatibility_date = "2024-07-01"
name = "jeffemmett-canvas"
account_id = "0e7b3338d5278ed1b148e6456b940913"
[vars]
# Environment variables are managed in Cloudflare Dashboard
# Workers & Pages → jeffemmett-canvas → Settings → Variables
DAILY_DOMAIN = "mycopunks.daily.co"
[dev]
port = 5172
ip = "0.0.0.0"
local_protocol = "http"
upstream_protocol = "https"
[durable_objects]
bindings = [
{ name = "AUTOMERGE_DURABLE_OBJECT", class_name = "AutomergeDurableObject" },
]
[[migrations]]
tag = "v1"
new_classes = ["AutomergeDurableObject"]
# Note: TldrawDurableObject → AutomergeDurableObject migration removed
# The AutomergeDurableObject class is already in use, so we can't rename to it.
# Any remaining TldrawDurableObject instances will be orphaned but won't cause issues.
# If you need to clean them up, you can add a delete-class migration in the future.
[[r2_buckets]]
binding = 'TLDRAW_BUCKET'
bucket_name = 'jeffemmett-canvas'
[[r2_buckets]]
binding = 'BOARD_BACKUPS_BUCKET'
bucket_name = 'board-backups'
[miniflare]
kv_persist = true
r2_persist = true
durable_objects_persist = true
[observability]
enabled = true
head_sampling_rate = 1
[triggers]
crons = ["0 0 * * *"] # Run at midnight UTC every day
# crons = ["*/10 * * * *"] # Run every 10 minutes
# Development environment configuration
[env.dev]
name = "jeffemmett-canvas-automerge-dev"
compatibility_date = "2024-07-01"
[env.dev.vars]
DAILY_DOMAIN = "mycopunks.daily.co"
[env.dev.durable_objects]
bindings = [
{ name = "AUTOMERGE_DURABLE_OBJECT", class_name = "AutomergeDurableObject" },
]
[[env.dev.migrations]]
tag = "v1"
new_classes = ["AutomergeDurableObject"]
[[env.dev.r2_buckets]]
binding = 'TLDRAW_BUCKET'
bucket_name = 'jeffemmett-canvas-preview'
[[env.dev.r2_buckets]]
binding = 'BOARD_BACKUPS_BUCKET'
bucket_name = 'board-backups-preview'
[env.dev.triggers]
crons = ["0 0 * * *"] # Run at midnight UTC every day
# Secrets should be set using `wrangler secret put` command
# DO NOT put these directly in wrangler.toml:
# - DAILY_API_KEY
# - CLOUDFLARE_API_TOKEN
# etc.