-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.toml.example
More file actions
66 lines (53 loc) · 1.91 KB
/
wrangler.toml.example
File metadata and controls
66 lines (53 loc) · 1.91 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
name = "aiep-workers"
main = "workers/event-store.js"
compatibility_date = "2025-01-01"
compatibility_flags = ["nodejs_compat"]
[vars]
ENVIRONMENT = "production"
# KV namespace — provision before deploying:
# wrangler kv namespace create AIEP_EVENTS
# Then replace the placeholder id below with the output id.
[[kv_namespaces]]
binding = "AIEP_EVENTS"
id = "REPLACE_WITH_KV_NAMESPACE_ID" # <-- set this before deploying
# R2 bucket — run `wrangler r2 bucket create aiep-nda` to provision
[[r2_buckets]]
binding = "AIEP_NDA_BUCKET"
bucket_name = "aiep-nda"
# Durable Object for tamper-evident event chain
# EventChainDO is exported from workers/event-chain-do.js and re-exported by the main Worker
[[durable_objects.bindings]]
name = "EVENT_CHAIN"
class_name = "EventChainDO"
[[migrations]]
tag = "v1"
new_sqlite_classes = ["EventChainDO"]
# Secrets — provision via the Cloudflare dashboard or CLI. Not declared in
# wrangler.toml because there is no valid [secrets] section in Wrangler v4
# (an empty value here would override a real provisioned secret).
#
# wrangler secret put TOKEN_SECRET
# wrangler secret put TOKEN_SECRET --env production
#
# TOKEN_SECRET: 32-byte random hex HMAC-SHA-256 key for dl-nda.js token verification.
# Routes
[[routes]]
pattern = "counters.aiep.dev/*"
zone_name = "aiep.dev"
[[routes]]
pattern = "aiep.dev/dl/nda/*"
zone_name = "aiep.dev"
[env.preview]
name = "aiep-workers-preview"
vars = { ENVIRONMENT = "preview" }
[env.production]
name = "aiep-workers"
# Provision: wrangler kv namespace create AIEP_EVENTS --env production
# Then replace the id value below with the output of that command.
[[env.production.kv_namespaces]]
binding = "AIEP_EVENTS"
id = "REPLACE_WITH_PRODUCTION_KV_NAMESPACE_ID"
[env.production.vars]
ENVIRONMENT = "production"
# Provision: wrangler secret put TOKEN_SECRET --env production
# TOKEN_SECRET: 32+ byte random hex string — generate with: openssl rand -hex 32