Repository navigation
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
52 lines (47 loc) · 1.98 KB
/
Copy pathwrangler.jsonc
File metadata and controls
52 lines (47 loc) · 1.98 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
// Cloudflare Worker config for a self-hosted DomBot instance.
// See docs/web-deployment.md and docs/self-hosting.md.
//
// Two products: Workers (this script + the built renderer as static assets +
// an hourly cron) and one D1 database. Secrets are NOT here — set them with
// `npm run web:secrets` (DOMBOT_SECRET, DOMBOT_PASSWORD).
{
"$schema": "./node_modules/wrangler/config-schema.json",
"name": "dombot",
// Keep version/alias URLs from bypassing the production hostname's Access gate.
"preview_urls": false,
"main": "src/worker/index.ts",
"compatibility_date": "2026-09-06",
// fast-xml-parser (via @aoxborrow/registrar-client) touches Buffer.
"compatibility_flags": ["nodejs_compat"],
// The renderer build (npm run web:build → dist/web). The Worker runs first
// for everything so it can gate the HTML behind auth and set CSP headers;
// it falls through to the assets binding for the SPA itself.
"assets": {
"directory": "./dist/web",
"binding": "ASSETS",
"not_found_handling": "single-page-application",
"run_worker_first": true,
},
"d1_databases": [
{
"binding": "DB",
"database_name": "dombot",
// Replaced by the Deploy button / `wrangler d1 create dombot`. Local
// dev (`wrangler dev`) ignores it and uses a local SQLite file.
"database_id": "00000000-0000-0000-0000-000000000000",
"migrations_dir": "migrations",
},
],
// Hourly floor; `syncAll()` honors the longer interval from Settings.
"triggers": { "crons": ["0 * * * *"] },
// Plain (non-secret) settings. Override per deployment as needed.
"vars": {
// "password" (built-in login, default) | "cloudflare-access" | "external".
// See docs/web-deployment.md → Auth modes.
"DOMBOT_AUTH": "password",
// cloudflare-access mode only:
// "CF_ACCESS_TEAM_DOMAIN": "https://<team>.cloudflareaccess.com",
// "CF_ACCESS_AUD": "<application audience tag>"
},
"observability": { "enabled": true, "head_sampling_rate": 1 },
}