mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 14:41:28 -07:00
82 lines
2.6 KiB
JSON
82 lines
2.6 KiB
JSON
{
|
|
"$schema": "node_modules/wrangler/config-schema.json",
|
|
"name": "mono",
|
|
"main": "src/mono.app.ts",
|
|
"compatibility_date": "2026-06-16",
|
|
"compatibility_flags": ["nodejs_compat"],
|
|
// --- Combined worker ---------------------------------------------------------------
|
|
// Mounts accounts, api, auth, cdn, chat, clubs, commerce, match, notify, ns,
|
|
// playersettings, rooms and storage in one deployable. Bindings below are the
|
|
// de-duplicated UNION of those workers' bindings — every one points at the same
|
|
// underlying resource the split workers already share, so this is not a migration.
|
|
//
|
|
// The static-asset workers (www, img, econ) are intentionally excluded: only one
|
|
// static `assets` binding is allowed per Worker. Resolve that before adding them.
|
|
|
|
// Shared `recflare` DB. "local" is replaced with the real id from RECFLARE_D1 at deploy.
|
|
"d1_databases": [
|
|
{
|
|
"binding": "DB",
|
|
"database_name": "recflare",
|
|
"database_id": "local"
|
|
}
|
|
],
|
|
// Shared R2 buckets: image storage (api) + binary room-data CDN (cdn/rooms/storage).
|
|
"r2_buckets": [
|
|
{
|
|
"binding": "IMAGES",
|
|
"bucket_name": "recflare-img"
|
|
},
|
|
{
|
|
"binding": "CDN_ASSETS",
|
|
"bucket_name": "recflare-cdn"
|
|
}
|
|
],
|
|
// Per-player settings KV (playersettings). "local" id replaced at deploy.
|
|
"kv_namespaces": [
|
|
{
|
|
"binding": "RECFLARE_PLAYER_SETTINGS",
|
|
"id": "local"
|
|
}
|
|
],
|
|
// Notifications hub. The class ships IN this worker (re-exported from notify), so it
|
|
// is bound locally (no script_name) and migrated here.
|
|
"durable_objects": {
|
|
"bindings": [{ "name": "RECFLARE_NOTIFICATIONS_HUB", "class_name": "NotificationsHub" }]
|
|
},
|
|
"migrations": [{ "tag": "v1", "new_sqlite_classes": ["NotificationsHub"] }],
|
|
// Presence sweep (owned by match). Every 5 minutes.
|
|
"triggers": {
|
|
"crons": ["*/5 * * * *"]
|
|
},
|
|
"logpush": false,
|
|
// Shared Secrets Store holding the HS256 JWT signing key, plus the Meta app secret
|
|
// the mounted `auth` app needs to verify Oculus logins. "local" store_id replaced
|
|
// with RECFLARE_SECRETS_STORE at deploy. Both must exist in the store or the deploy
|
|
// fails — see DEPLOYING.md.
|
|
"secrets_store_secrets": [
|
|
{
|
|
"binding": "JWT_SECRET",
|
|
"store_id": "local",
|
|
"secret_name": "JWT_SECRET"
|
|
},
|
|
{
|
|
"binding": "META_APP_SECRET",
|
|
"store_id": "local",
|
|
"secret_name": "META_APP_SECRET"
|
|
}
|
|
],
|
|
"upload_source_maps": true,
|
|
"observability": {
|
|
"logs": {
|
|
"enabled": true,
|
|
"head_sampling_rate": 1 // 100%
|
|
}
|
|
},
|
|
"vars": {
|
|
"NAME": "mono", // logging tag; split workers derive this per-app
|
|
"ENVIRONMENT": "development", // overridden during deployment
|
|
"SENTRY_RELEASE": "unknown" // overridden during deployment
|
|
}
|
|
}
|