tangled knot that runs entirely on cloudflare
Something went wrong. Try again.
Rust 96%
JavaScript 3%
Shell <1%
Nix <1%
Dockerfile <1%
Commits 22
readme
Signed-off-by: oppiliappan <me@oppi.li>
nix: add dev shell
Signed-off-by: oppiliappan <me@oppi.li>
drop everything the worker doesn't use
Signed-off-by: oppiliappan <me@oppi.li>
knot-atproto: build test fixtures with jacquard-common
Signed-off-by: oppiliappan <me@oppi.li>
knot-langs: drop repo feature
Signed-off-by: oppiliappan <me@oppi.li>
worker: render a homepage listing hosted repos
Signed-off-by: oppiliappan <me@oppi.li>
knot2/worker: collaborator routes
Signed-off-by: oppiliappan <me@oppi.li>
knot2/worker: no ref updates for a push artifacts didn't report on
Signed-off-by: oppiliappan <me@oppi.li>
readme.txt
naut
----
an experimental tangled knot that runs on cloudflare workers
and artifacts.
the knot is one cloudflare worker. each repository is an
artifacts repository. a durable object keeps the list of
repositories, the collaborators and the event log.
git clients are redirected by the worker to the artifacts
remote, this very repository is hosted and served from a CF
artifact!
$ git clone https://tangled.org/oppi.li/naut
Cloning into 'naut'...
warning: redirecting to https://....artifacts.cloudflare.net...
build
-----
the dev shell is supplied by nix:
nix develop
cd worker
worker-build --release
the build output goes into `worker/build`.
usage
-----
to run your own knot:
1. copy worker/wrangler.jsonc to a new file in worker.
2. set KNOT_HOSTNAME to the hostname of the worker, set
KNOT_ADMINS to the dids of the knot admins and set the
artifacts `namespace`. put your did first in `KNOT_ADMINS`.
the first did is the owner of the knot.
3. add the knot's signing key as a secret:
openssl rand -hex 32 > signing-key.hex
npx wrangler secret put KNOT_SIGNING_KEY --config <your config> < signing-key.hex
keep a copy of the key in a safe location.
4. deploy:
npx wrangler deploy --config <your config>
5. add the knot on tangled in settings
once you have a knot running, you can push over http:
1. log in with goat[0]:
goat account login -u <your handle> -p <app password>
2. tell git to use `scripts/git-credential-knot`:
git config credential.https://<hostname>.helper ""
git config --add credential.https://<hostname>.helper \
"!/naut/scripts/git-credential-knot"
3. push:
git push https://<hostname>/<repo did> main
limitations
-----------
running up against some limitations of CF artifacts on
tangled:
- artifacts don't support arbitrary git filters,
`--filter:tree:0` fails
- artifacts don't support objects >30M, so i am unable to
work on larger repositories, or run the gitmirror service
entirely on CF
[0]: https://github.com/bluesky-social/goat