g1t/services/identity/wrangler.jsonc
| 1 | { |
| 2 | "$schema": "../../node_modules/wrangler/config-schema.json", |
| 3 | "name": "g1t-identity", |
| 4 | "account_id": "1e6f2cffa3f445920836e8ebe446bb58", |
| 5 | "compatibility_date": "2026-09-26", |
| 6 | // Runs next to its database: a request makes several queries in turn, |
| 7 | // and each would otherwise cross the distance to it. |
| 8 | "placement": { "mode": "off" }, |
| 9 | "main": "build/index.js", |
| 10 | // Staff waitlist summaries (src/lib.rs `scheduled`). |
| 11 | "triggers": { "crons": ["*/15 * * * *"] }, |
| 12 | "build": { "command": "node ../../scripts/build-rust-worker.mjs" }, |
| 13 | // Reached only through service bindings. |
| 14 | "workers_dev": false, |
| 15 | "d1_databases": [ |
| 16 | { |
| 17 | "binding": "DB", |
| 18 | "database_name": "g1t", |
| 19 | "database_id": "b7d49c93-2666-4006-a3c3-073a01838dc9", |
| 20 | "migrations_dir": "migrations" |
| 21 | } |
| 22 | ], |
| 23 | "send_email": [{ "name": "EMAIL", "remote": true }], |
| 24 | // Uploaded avatars, keyed by the SHA-256 of their bytes. Only this |
| 25 | // service writes them; the site reads them to serve /avatars/<hash>. |
| 26 | "kv_namespaces": [{ "binding": "AVATARS", "id": "e627b571f07047e187c03e1fc2b3bbdd" }], |
| 27 | // Renaming a workspace publishes workspace.renamed, so every service |
| 28 | // moves what it keeps under the old slug. |
| 29 | "services": [ |
| 30 | { "binding": "EVENTS", "service": "g1t-events" }, |
| 31 | // Deleting a workspace asks whether it still holds repositories or |
| 32 | // projects, and has billing settle it first (src/deletion.rs). |
| 33 | { "binding": "REPOS", "service": "g1t-repos" }, |
| 34 | { "binding": "PROJECTS", "service": "g1t-projects" }, |
| 35 | { "binding": "BILLING", "service": "g1t-billing" } |
| 36 | ], |
| 37 | // Signing in with GitHub (src/github.rs), through g1t's GitHub App. |
| 38 | // Its client ID is public. Secrets: GITHUB_APP_CLIENT_SECRET, the app's |
| 39 | // client secret, and IDENTITY_KEY, 64 hex characters, which seals the |
| 40 | // GitHub user tokens kept for each linked account. Without the client ID |
| 41 | // and secret, nobody is offered GitHub sign-in. |
| 42 | // |
| 43 | // Invites (src/invites.rs): g1t.sh is invite-only, so every new account |
| 44 | // needs an invite code; "open" lets anyone register. Unset means |
| 45 | // invite. Each person may have INVITES_PER_USER invites out, each |
| 46 | // working INVITE_TTL_DAYS; owners of INVITE_STAFF_WORKSPACES (g1t's own) |
| 47 | // have no limit. IDENTITY_KEY also seals invite codes so their makers |
| 48 | // can copy them again. |
| 49 | // |
| 50 | // The waitlist: whoever asks for access gets one confirmation, and |
| 51 | // WAITLIST_NOTIFY_EMAIL gets a summary of new requests at most every |
| 52 | // 15 minutes, linking to sudo's Waitlist. Empty sends none. |
| 53 | "vars": { |
| 54 | "GITHUB_APP_CLIENT_ID": "Iv23liZS94alfjIUn1eW", |
| 55 | "REGISTRATION_MODE": "invite", |
| 56 | "INVITES_PER_USER": "5", |
| 57 | "INVITE_TTL_DAYS": "30", |
| 58 | "INVITE_STAFF_WORKSPACES": "flagon-io", |
| 59 | "WAITLIST_NOTIFY_EMAIL": "hey@flagon.io" |
| 60 | }, |
| 61 | "observability": { "enabled": true } |
| 62 | } |