aboutsummaryrefslogtreecommitdiff
path: root/wrangler.jsonc
diff options
context:
space:
mode:
authorLena <lena@omega>2026-08-01 00:00:00 +0000
committerLena <lena@omega>2026-08-01 00:00:00 +0000
commit3284b1c4906b90ca2e3864937c66d0fa30772ebf (patch)
treead799407ac7b0a2589a344751f4c5b3cf575d5c5 /wrangler.jsonc
downloadgit-forge-cloudflare-3284b1c4906b90ca2e3864937c66d0fa30772ebf.tar.gz
Enter git-forge-cloudflareHEADmaster
Runs git-forge on Cloudflare Containers with R2 for durable storage. A Worker routes every request to one container through a Durable Object. Inside it, syncd mirrors the data directory to the bucket and restores it at boot, holding a write until it is durable. git-forge is neither modified nor vendored: the image builds it from its own repository at the commit named in forge.rev.
Diffstat (limited to 'wrangler.jsonc')
-rw-r--r--wrangler.jsonc35
1 files changed, 35 insertions, 0 deletions
diff --git a/wrangler.jsonc b/wrangler.jsonc
new file mode 100644
index 0000000..7144cdc
--- /dev/null
+++ b/wrangler.jsonc
@@ -0,0 +1,35 @@
+{
+ // One worker, one durable object, one container. The name is fixed at
+ // "forge" in worker.js, so exactly one container serves the bucket.
+ "name": "git-forge",
+ "main": "worker.js",
+ "compatibility_date": "2026-08-01",
+ "observability": { "enabled": true },
+
+ "containers": [
+ {
+ "class_name": "Forge",
+ "image": "./Containerfile",
+ // 1/4 vCPU, 1 GiB, 4 GB disk. Disk is the ceiling on the datadir,
+ // and git gc needs room to repack on top of it.
+ "instance_type": "basic",
+ "max_instances": 1
+ }
+ ],
+
+ "durable_objects": {
+ "bindings": [{ "name": "FORGE", "class_name": "Forge" }]
+ },
+ "migrations": [{ "tag": "v1", "new_sqlite_classes": ["Forge"] }],
+
+ "r2_buckets": [{ "binding": "BUCKET", "bucket_name": "git-forge" }],
+
+ // No vars: an environment value pins what the admin page could otherwise
+ // change. GIT_FORGE_BASE_URL is the exception, for a custom domain fronting
+ // a hostname requests do not arrive on.
+
+ // Outbound mail: worker.js answers Mailgun's api shape and decides what
+ // sends. Nothing is sent until forge.json names the intercepted host;
+ // delete this line to rule mail out.
+ "send_email": [{ "name": "SEND_EMAIL" }]
+}