forked from payloadcms/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.optional-bindings.jsonc
More file actions
69 lines (58 loc) · 2.23 KB
/
Copy pathwrangler.optional-bindings.jsonc
File metadata and controls
69 lines (58 loc) · 2.23 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
// =============================================================================
// OPTIONAL Cloudflare Worker bindings — not loaded by Wrangler as its own config.
// Merge snippets into the ROOT object of wrangler.jsonc only when you provision
// the matching resources — add as few bindings as the feature requires (each product
// bills or meters separately). Default Payload + OpenNext needs ONLY what is already
// active in wrangler.jsonc (D1, R2×2, ASSETS, IMAGES, WORKER_SELF_REFERENCE).
//
// Full platform coverage (paid/free products, what’s wired in app code):
// config/cloudflare-platform-coverage.md
//
// Docs: https://developers.cloudflare.com/workers/runtime-apis/bindings/
// Wrangler: https://developers.cloudflare.com/workers/wrangler/configuration/
// =============================================================================
/*
--- KV ---
wrangler kv namespace create CACHE
Then add to wrangler.jsonc:
"kv_namespaces": [
{ "binding": "KV_CACHE", "id": "<namespace_id>" }
]
--- Queues (producer example) ---
"queues": {
"producers": [
{ "binding": "QUEUE_OUT", "queue": "your-queue-name" }
]
}
--- Hyperdrive (Postgres acceleration) ---
Create in dashboard / wrangler hyperdrive create, then:
"hyperdrive": [
{ "binding": "HYPERDRIVE", "id": "<hyperdrive_config_id>" }
]
--- Vectorize ---
"vectorize": [
{ "binding": "VECTORIZE", "index_name": "your-index" }
]
--- Workers AI ---
"ai": { "binding": "AI" }
--- Analytics Engine ---
"analytics_engine_datasets": [
{ "binding": "ANALYTICS", "dataset": "your_dataset" }
]
--- Browser Rendering (product-specific; see Cloudflare docs) ---
"browser": { "binding": "BROWSER" }
--- Secrets Store (binding name → store secret) ---
"secrets_store_secrets": [
{
"binding": "MY_STORED_SECRET",
"store_id": "<secrets_store_id>",
"secret_name": "<secret_name>"
}
]
--- Cron triggers (scheduled Worker) ---
"triggers": { "crons": ["0 * * * *"] }
--- Durable Objects (requires migrations + class export in Worker entry) ---
OpenNext owns .open-next/worker.js — adding DOs usually means a separate Worker
or upstream OpenNext support. Prefer Queues/KV/Hyperdrive unless you maintain a
custom Worker wrapper.
*/