From 3284b1c4906b90ca2e3864937c66d0fa30772ebf Mon Sep 17 00:00:00 2001 From: Lena Date: Sat, 1 Aug 2026 00:00:00 +0000 Subject: Enter git-forge-cloudflare 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. --- wrangler.jsonc | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 wrangler.jsonc (limited to 'wrangler.jsonc') 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" }] +} -- cgit v1.2.3