mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 22:51:30 -07:00
experimental monolithic service
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"$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. "local" store_id replaced
|
||||
// with RECFLARE_SECRETS_STORE at deploy.
|
||||
"secrets_store_secrets": [
|
||||
{
|
||||
"binding": "JWT_SECRET",
|
||||
"store_id": "local",
|
||||
"secret_name": "JWT_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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user