# Wrangler configuration for the pages Worker. # Used by `wrangler deploy` — the Cloudflare Terraform provider v4 does not # support uploading ES module workers that import wasm files, so wrangler # handles the multipart module bundle upload (see pages/CLAUDE.md # "Deviations from repo defaults"). OpenTofu (infra/) owns the R2 bucket, # D1 database, DNS, and rate limits. name = "pages" main = "build/index.js" compatibility_date = "2026-07-12" [build] command = "worker-build --release" # Route: maps all of pages.elijah.run to this worker. The DNS record it # rides on is created by the OpenTofu config in infra/ (proxied AAAA 100::). [[routes]] pattern = "pages.elijah.run/*" zone_name = "elijah.run" # D1 database binding — referenced in workers-rs code as `env.d1("DB")`. [[d1_databases]] binding = "DB" database_name = "pages" # ID output by the OpenTofu D1 resource in infra/ (tofu output d1_database_id). database_id = "6c5cd319-18d6-4ec8-bfa3-64479aef12ed" # R2 bucket binding — referenced in workers-rs code as `env.bucket("PAGES")`. [[r2_buckets]] binding = "PAGES" bucket_name = "pages" [vars] BASE_URL = "https://pages.elijah.run" # GitHub OAuth App client ID (public). Set the real value before deploying. GITHUB_CLIENT_ID = "Ov23liQFioTbWqqfUPYi" # GitHub login that is auto-promoted to admin on first login. Set the real value before deploying. ADMIN_GITHUB_LOGIN = "pop" # GITHUB_CLIENT_SECRET is a wrangler secret, not a var — set it with: # wrangler secret put GITHUB_CLIENT_SECRET # Never store it in this file or commit it to the repo.