-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
84 lines (74 loc) · 1.96 KB
/
Copy pathwrangler.jsonc
File metadata and controls
84 lines (74 loc) · 1.96 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// Cloudflare Workers Configuration
{
"name": "threat-intel-dashboard",
"main": "./src/worker.ts",
"compatibility_date": "2025-03-07",
"compatibility_flags": ["nodejs_compat"],
// Static assets (React frontend)
"assets": {
"directory": "./dist",
"binding": "ASSETS"
},
// Native cron triggers - runs every 6 hours
// Handles both feed ingestion AND automatic AI processing
"triggers": {
"crons": ["0 */6 * * *"]
},
// D1 Database binding
"d1_databases": [
{
"binding": "DB",
"database_name": "threat-intel-db",
"database_id": "fa9eb5bd-20bf-480d-baf2-567d18f171d1"
}
],
// Vectorize for semantic search
"vectorize": [
{
"binding": "VECTORIZE_INDEX",
"index_name": "threat-embeddings"
}
],
// Workers AI binding
"ai": {
"binding": "AI"
},
// KV for caching and rate limiting
"kv_namespaces": [
{
"binding": "CACHE",
"id": "7c283ec5b00d4076ae42f5f995015fbf",
"preview_id": "475ea316d57c49c7bbc885f1ff331e19"
}
],
// Analytics Engine for trend data
"analytics_engine_datasets": [
{
"binding": "ANALYTICS",
"dataset": "threat_metrics"
}
],
// R2 Storage for threat archives
// ⚠️ IMPORTANT: R2 requires active billing account and payment method
// See docs/R2_STORAGE.md for billing requirements and quota protection
// Create bucket: npx wrangler r2 bucket create threat-intel-archive
"r2_buckets": [
{
"binding": "THREAT_ARCHIVE",
"bucket_name": "threat-intel-archive"
}
],
// Environment variables
// Production: ENVIRONMENT=production (debug endpoints disabled)
// Local dev: Create .dev.vars with ENVIRONMENT=development (debug endpoints enabled)
"vars": {
"ENVIRONMENT": "production",
"AI_GATEWAY_ID": "threat-intel-dashboard",
"R2_ARCHIVE_ENABLED": "true"
},
// Observability for logging and monitoring
"observability": {
"enabled": true,
"head_sampling_rate": 1
}
}