mirror of
https://github.com/djdevin/recflare.git
synced 2026-10-25 23:18:51 -07:00
65 lines
2.4 KiB
JSON
65 lines
2.4 KiB
JSON
{
|
|
"$schema": "node_modules/wrangler/config-schema.json",
|
|
"name": "studio",
|
|
"main": "src/studio.app.ts",
|
|
"compatibility_date": "2026-06-16",
|
|
"compatibility_flags": ["nodejs_compat"],
|
|
// Shared `recflare` D1. Room co-owners come off the `room` blob and who is in a
|
|
// subroom comes off `presence` (other workers own those tables), and a stored
|
|
// bundle is a row of the rooms worker's `unity_asset`. This worker owns the
|
|
// cloud-build table, migrated from `migrations/`; its own
|
|
// migrations_table keeps that history separate from the other workers'
|
|
// migrations on the shared database. The "local" placeholder is replaced with
|
|
// RECFLARE_D1 at deploy time.
|
|
"d1_databases": [
|
|
{
|
|
"binding": "DB",
|
|
"database_name": "recflare",
|
|
"database_id": "local",
|
|
"migrations_dir": "migrations",
|
|
"migrations_table": "d1_migrations_studio"
|
|
}
|
|
],
|
|
// Shared `recflare-cdn` R2 bucket (also bound by `rooms` / `cdn` / `storage`).
|
|
// Local Studio asset bundles live here under `room/studio/<roomId>/`.
|
|
// bucket_name is a literal, so nothing is spliced at deploy time.
|
|
"r2_buckets": [
|
|
{
|
|
"binding": "CDN_ASSETS",
|
|
"bucket_name": "recflare-cdn"
|
|
}
|
|
],
|
|
// 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 credential the cloud-building pull worker (recflare/cloud-building, its
|
|
// STUDIO_WORKER_KEY) presents as a bearer token on /internal/cloud-builds/*. A real
|
|
// secret, so it lives in the same store rather than riding along as a `--var` from
|
|
// .env, which would put it in plaintext on every worker. The binding must resolve
|
|
// for this worker to deploy: create it with the value `off` to run without cloud
|
|
// builds (creation then answers 503 and the private routes refuse everyone).
|
|
//
|
|
// wrangler secrets-store secret create <store-id> --name CLOUD_BUILD_KEY \
|
|
// --scopes workers --remote
|
|
{
|
|
"binding": "CLOUD_BUILD_KEY",
|
|
"store_id": "local",
|
|
"secret_name": "CLOUD_BUILD_KEY"
|
|
}
|
|
],
|
|
"upload_source_maps": true,
|
|
"observability": {
|
|
"enabled": false
|
|
},
|
|
"vars": {
|
|
"ENVIRONMENT": "development", // overridden during deployment
|
|
"SENTRY_RELEASE": "unknown" // overridden during deployment
|
|
}
|
|
}
|