Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

43 linesCodeBlameRaw
1// The packages service as `wrangler dev` runs it on its own: local D1 and
2// R2, its other services stubbed (stubs.js). From services/packages:
3//
4// node ../../scripts/build-rust-worker.mjs
5// npx wrangler d1 migrations apply g1t-packages --local -c dev/packages.jsonc
6// npx wrangler dev -c dev/packages.jsonc -c dev/stubs.jsonc --local --port 8790
7//
8// Then `docker login localhost:8790 -u dev` with g1t_devtoken as the
9// password, and push to localhost:8790/acme/<name> (`acme/web` is linked to
10// a private repository, `acme/site` to a public one). With Docker Desktop
11// the daemon's localhost is its VM's: forward it to this machine first,
12//
13// docker run -d --name g1t-registry-forward --network host alpine/socat \
14// tcp-listen:8790,fork,reuseaddr tcp-connect:host.docker.internal:8790
15//
16// Add --test-scheduled to `wrangler dev` to run the sweep with
17// `curl "http://localhost:8790/cdn-cgi/handler/scheduled?cron=37+*+*+*+*"`.
18{
19 "name": "g1t-packages",
20 "main": "../build/index.js",
21 "compatibility_date": "2026-09-26",
22 "d1_databases": [{ "binding": "DB", "database_name": "g1t-packages", "database_id": "local", "migrations_dir": "../migrations" }],
23 "r2_buckets": [{ "binding": "BLOBS", "bucket_name": "g1t-packages" }],
24 // Low, so the 429 can be seen by hand: about 30 requests a minute.
25 "ratelimits": [
26 { "name": "ANONYMOUS_LIMIT", "namespace_id": "1", "simple": { "limit": 30, "period": 60 } },
27 { "name": "SIGNED_LIMIT", "namespace_id": "2", "simple": { "limit": 5000, "period": 60 } },
28 ],
29 "services": [
30 { "binding": "IDENTITY", "service": "g1t-packages-stubs" },
31 { "binding": "REPOS", "service": "g1t-packages-stubs" },
32 { "binding": "EVENTS", "service": "g1t-packages-stubs" },
33 { "binding": "BILLING", "service": "g1t-packages-stubs" },
34 ],
35 "vars": {
36 "BLOB_STORE": "r2",
37 "MAX_REQUEST_BYTES": "100000000",
38 "REGISTRY_HOST": "localhost:8790",
39 "STORAGE_LIMITS": "on",
40 "PACKAGES_TOKEN_SECRET": "a-local-secret-that-is-long-enough-to-sign",
41 },
42 "triggers": { "crons": ["37 * * * *"] },
43}