forked from TQZHR/grok2api
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwrangler.toml
More file actions
52 lines (41 loc) · 1.42 KB
/
wrangler.toml
File metadata and controls
52 lines (41 loc) · 1.42 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
name = "grok2api"
main = "src/index.ts"
compatibility_date = "2026-01-28"
# Static assets (admin UI)
assets = { directory = "./app/static", binding = "ASSETS" }
# Hard-pin execution closer to the US to make egress locality more stable.
# Docs: https://developers.cloudflare.com/workers/platform/placement/
[placement]
region = "aws:us-east-1"
[[d1_databases]]
binding = "DB"
database_name = "grok2api"
# Filled by CI / your first deployment bootstrap.
database_id = "REPLACE_WITH_D1_DATABASE_ID"
migrations_dir = "migrations"
[[kv_namespaces]]
binding = "KV_CACHE"
# Filled by CI / your first deployment bootstrap.
id = "REPLACE_WITH_KV_NAMESPACE_ID"
# Durable Objects migrations history:
# - do-v1 created AutoRegisterJob (now removed)
# - do-v2 deletes it so the Worker can deploy without exporting the class
[[migrations]]
tag = "do-v1"
new_sqlite_classes = ["AutoRegisterJob"]
[[migrations]]
tag = "do-v2"
deleted_classes = ["AutoRegisterJob"]
[vars]
# Daily reset at local midnight (default: Asia/Shanghai, UTC+8).
# Make sure the cron below matches this offset.
CACHE_RESET_TZ_OFFSET_MINUTES = "480"
# Build info (CI will inject commit SHA into wrangler.ci.toml)
BUILD_SHA = "dev"
# Workers KV has per-value limits; keep <= 25MB.
KV_CACHE_MAX_BYTES = "26214400"
# Batch size for the daily cleanup job (deleting KV keys + D1 rows).
KV_CLEANUP_BATCH = "200"
[triggers]
# Every day at 00:00 (Asia/Shanghai => 16:00 UTC)
crons = ["0 16 * * *"]