365 lines · 10.3 KB
{
  "$schema": "node_modules/wrangler/config-schema.json",
  "name": "gitfor",
  "compatibility_date": "2026-10-08",
  "compatibility_flags": ["nodejs_compat"],
  "main": "src/server.ts",
  "observability": {
    "enabled": true
  },
  // Optional Stripe billing (docs/billing.md). Leave unset to self-host without billing; nothing requires Stripe.
  // Set with `wrangler secret put` (or .dev.vars locally; see .dev.vars.example):
  //   STRIPE_SECRET_KEY       enables billing (sk_test_/sk_live_ or a restricted rk_ key)
  //   STRIPE_PUBLISHABLE_KEY  pk_ key shown to the browser
  //   STRIPE_WEBHOOK_SECRET   signing secret of the endpoint at <PUBLIC_URL>/stripe/webhook
  //   STRIPE_PRICE_PRO        price id of the Pro monthly subscription
  //   STRIPE_TOPUP_PRICES     JSON {"<pack id from src/lib/pricing.ts>": "price_..."}
  //   STRIPE_DEV_REPLAY       "true" enables the loopback-only /__dev/stripe/replay route (test keys only)
  // Optional PostHog analytics (docs/analytics.md). Off unless POSTHOG_KEY is set:
  //   POSTHOG_KEY             project token (phc_...); VITE_POSTHOG_PROJECT_TOKEN is accepted as an alias
  //   POSTHOG_HOST            ingestion host, default https://us.i.posthog.com (VITE_POSTHOG_HOST alias)
  //   POSTHOG_PERSON_EMAIL    "true" attaches the signed-in user's email to their person (off: no PII)
  // This file is the PRODUCTION config (`bun run deploy`). `bun run dev` / `bun run preview` apply the dev
  // overrides in vite.config.ts on top of it: PUBLIC_URL=http://localhost:3000, GITFOR_LOCAL=true, and every
  // Artifacts namespace and trigger filter renamed to `<namespace>-dev`. A deployed worker refuses to serve
  // (503) until PUBLIC_URL, USERCONTENT_ORIGIN and SECRETS_KEY are set correctly; see README "Production setup".
  // Required secrets: SECRETS_KEY (>= 32 chars). First admin: set ADMIN_EMAIL (promoted once that address is
  // verified) or the one-time BOOTSTRAP_TOKEN secret.
  "vars": {
    "FORGE_NAME": "gitfor",
    "ARTIFACTS_NAMESPACE": "stig",
    "ARTIFACTS_SHARDS": "1",
    "ARTIFACTS_ORPHAN_SWEEP": "report",
    "ARTIFACTS_NAMESPACE_EXCLUSIVE": "false",
    "SIGNUPS_ENABLED": "true",
    "PUBLIC_URL": "", // REQUIRED: https://<your forge host>
    "ADMIN_EMAIL": "",
    "CLOUD_JOBS_PER_OWNER": "2",
    "CLOUD_MINUTES_PER_DAY": "60",
    "LFS_STORAGE_BYTES_PER_OWNER": "2147483648",
    "LFS_BANDWIDTH_BYTES_PER_MONTH": "5368709120",