57 lines · 2.4 KB
{
  // Nothing here is specific to one deployment, so this file can be cloned
  // or deployed by anyone as-is. Your domain and limits go in secrets
  // (`wrangler secret put`, or the deploy button's own prompts, which cover
  // everything listed in .dev.vars.example). Secrets stay out of the repo
  // and survive deploys, which plaintext dashboard variables do not.
  //
  // DISPOSABLE_DOMAIN is what picks the Worker's mode: set it to a domain
  // you own to receive through Email Routing, or leave it unset to run on
  // mail.tm instead, needing no domain, no DNS and no Email Routing. Unset
  // is the default precisely because it needs nothing.
  //
  // Committed rather than gitignored because Cloudflare Workers Builds
  // clones the repo and needs the D1 binding present at build time, and
  // dashboard-set bindings don't reliably survive into new versions. Once
  // this file exists it's the source of truth for vars and bindings, so
  // dashboard-only entries not listed here stop applying.
  //
  // Custom domains are the exception: they're a zone-level resource that
  // deploying without a "routes" key does NOT remove (verified against the
  // API). Attach one from the dashboard under Domains & Routes and it
  // persists. Pinning it here instead would put a hostname only one account
  // owns into everyone's config.
  "name": "cinderbox",
  "main": "src/worker.ts",
  "compatibility_date": "2024-09-23",
  "compatibility_flags": ["nodejs_compat"],
  // Both default to false once any route is configured, and a workers.dev
  // URL is worth keeping: it's the fallback when no custom domain is
  // attached, and it's a usable Discord interactions endpoint on its own.
  "workers_dev": true,
  "preview_urls": true,
  "vars": {
    "ADAPTERS": "discord,telegram"
  },
  "d1_databases": [
    {
      "binding": "DB",
      "database_name": "cinderbox",
      "database_id": "80611409-6ad6-4226-a988-238e3d2e01fa"