forked from aozorae/Edgechat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.example.toml
More file actions
59 lines (48 loc) · 1.45 KB
/
Copy pathwrangler.example.toml
File metadata and controls
59 lines (48 loc) · 1.45 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
# Legacy Worker service name kept to avoid creating a new production Worker during rename cleanup.
name = "cfchat"
main = "worker/src/index.js"
compatibility_date = "2026-04-05"
compatibility_flags = ["nodejs_compat"]
[vars]
ADMIN_USERNAMES = "admin"
MESSAGE_RETENTION_DAYS = "7"
SOFT_DELETE_RETENTION_DAYS = "60"
GC_BATCH_SIZE = "500"
GC_MAX_BATCHES_PER_RUN = "20"
R2_DELETE_MAX_RETRY = "8"
ALLOWED_FILE_TYPES = "image/,video/,application/pdf,text/"
MAX_FILE_SIZE = "20971520"
[[d1_databases]]
binding = "DB"
# Legacy D1 resource name kept intentionally; do not rename without a data migration plan.
database_name = "cfchat-db"
database_id = "YOUR_D1_DATABASE_ID_HERE"
[[kv_namespaces]]
binding = "SESSIONS"
id = "YOUR_KV_NAMESPACE_ID_HERE"
[[r2_buckets]]
binding = "FILES"
# Legacy R2 bucket name kept intentionally; code/docs use Edgechat branding.
bucket_name = "cfchat-files"
[[durable_objects.bindings]]
name = "CHANNEL_ROOM"
class_name = "ChannelRoom"
[[durable_objects.bindings]]
name = "SCHEDULER"
class_name = "Scheduler"
[[durable_objects.bindings]]
name = "USER_INBOX"
class_name = "UserInbox"
[[migrations]]
tag = "v1"
new_sqlite_classes = ["ChannelRoom", "Scheduler"]
[[migrations]]
tag = "v2"
new_sqlite_classes = ["UserInbox"]
[assets]
directory = "./frontend/dist"
not_found_handling = "single-page-application"
run_worker_first = ["/api/*", "/files/*"]
[triggers]
# Cloudflare Cron 按 UTC 执行;19:00 UTC = 北京时间每天 03:00
crons = ["0 19 * * *"]