Files
recflare/apps/match/wrangler.jsonc
T
2026-08-07 17:24:08 -04:00

60 lines
2.0 KiB
JSON

{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "match",
"main": "src/match.app.ts",
"compatibility_date": "2026-06-16",
"compatibility_flags": ["nodejs_compat"],
// Shared `recflare` DB. Reads room scenes for matchmaking, writes a player's
// personal dorm room on first dorm entry (see getOrCreateDormRoom), and holds
// player presence (the `presence` table — owned/migrated by the `rooms` worker).
// The "local" placeholder is replaced with the real id from RECFLARE_D1 at deploy time.
"d1_databases": [
{
"binding": "DB",
"database_name": "recflare",
"database_id": "local"
}
],
// Presence sweep. Rows expire on their own TTL (15m) and reads already ignore
// expired ones, so this is housekeeping: it purges them, deletes the room
// instances left with nobody in them, and recomputes the fullness of the
// instances the departed players were in (a crashed player never matchmakes out,
// so nothing else notices they left). Every 5 minutes.
"triggers": {
"crons": ["*/5 * * * *"]
},
"logpush": false,
// Shared Secrets Store holding the HS256 JWT signing key. Every worker binds the
// same store as JWT_SECRET so tokens signed by `auth` verify here. The "local"
// store_id placeholder is replaced with RECFLARE_SECRETS_STORE at deploy time.
"secrets_store_secrets": [
{
"binding": "JWT_SECRET",
"store_id": "local",
"secret_name": "JWT_SECRET"
}
],
// The `notify` worker's NotificationsHub DO — used by POST /invite to push the
// game-invite message to the invitee's live socket.
"durable_objects": {
"bindings": [
{
"name": "RECFLARE_NOTIFICATIONS_HUB",
"class_name": "NotificationsHub",
"script_name": "notify"
}
]
},
"upload_source_maps": true,
"observability": {
"logs": {
"enabled": true,
"head_sampling_rate": 1 // 100%
}
},
"vars": {
"ENVIRONMENT": "development", // overridden during deployment
"SENTRY_RELEASE": "unknown" // overridden during deployment
}
}