g1t/services/repos/wrangler.jsonc

57 lines2,632 bytesCodeBlame
1{
2 "$schema": "../../node_modules/wrangler/config-schema.json",
3 "name": "g1t-repos",
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 "build": { "command": "node ../../scripts/build-rust-worker.mjs" },
11 "workers_dev": false,
12 "d1_databases": [
13 {
14 "binding": "DB",
15 "database_name": "g1t-repos",
16 "database_id": "f9544c51-c3bf-4621-a96f-8a6d5cf24a97",
17 "migrations_dir": "migrations"
18 }
19 ],
20 "artifacts": [{ "binding": "ARTIFACTS", "namespace": "g1t" }],
21 // Shared between isolates (src/shared.rs): the git store's credentials
22 // (src/store.rs) and the ref listings git asks for first
23 // (src/refs_cache.rs), every value sealed with the REPOS_KEY secret (64
24 // hex characters). Without the binding or the secret each isolate keeps
25 // only its own. Made by `npx wrangler kv namespace create g1t-repos-git-cache`:
26 "kv_namespaces": [{ "binding": "GIT_CACHE", "id": "be765052d0124c2a935b3db4dff99f1f" }],
27 "services": [
28 { "binding": "IDENTITY", "service": "g1t-identity" },
29 { "binding": "EVENTS", "service": "g1t-events" },
30 // Push protection asks which secrets were allowed, and records the rest.
31 { "binding": "SECURITY", "service": "g1t-security" },
32 // Whether a workspace far past its free git operations is on the
33 // plan (src/git_ops.rs); asked only then.
34 { "binding": "BILLING", "service": "g1t-billing" }
35 ],
36 // A free workspace past this many git operations in a month is slowed
37 // to this many an hour, never charged (src/git_ops.rs). It is billing's
38 // GIT_OPERATIONS_INCLUDED, the amount free for every workspace: past it,
39 // a workspace on the plan pays at cost plus 20% and is never slowed.
40 // FREE_PRIVATE_STORAGE_BYTES: a free workspace's private repositories may
41 // hold this much (1 GB); past it, pushes to them stop. Billing reads the
42 // same amount.
43 "vars": {
44 "GIT_OPERATIONS_FREE_CAP": "50000",
45 "GIT_OPERATIONS_FREE_HOURLY": "60",
46 "FREE_PRIVATE_STORAGE_BYTES": "1000000000"
47 },
48 // Every hour, deleted repositories whose 30 days to be restored have
49 // passed are purged, their git data with them (src/lifecycle.rs).
50 "triggers": { "crons": ["23 * * * *"] },
51 // A workspace renamed moves its repositories to the new slug; one
52 // deleted purges the repositories it left in Recently deleted.
53 "queues": {
54 "consumers": [{ "queue": "g1t-events-repos", "max_batch_size": 20, "max_batch_timeout": 1 }]
55 },
56 "observability": { "enabled": true }
57}