+4
app/app.vue
+4
app/app.vue
+214
-8
content/posts/0-draft-embracing-atproto-pt-2-tangled-knot.md
+214
-8
content/posts/0-draft-embracing-atproto-pt-2-tangled-knot.md
···Built on atproto, tangled allows you to use your Bluesky identity on a (not quite yet) fully feldged git platform!···-Bluesky and the AT Protocol are backed and built by a very competent team of well funded engineers for a few years already.+Bluesky and the AT Protocol are built by a very competent team of well funded engineers working on it for a few years already.-Tangled, on the other hand, was started only about 8 months ago, at the start of 2025 by [two](https://tangled.sh/@oppi.li) [brothers](https://tangled.sh/@icyphox.sh).+[Tangled](https://tangled.sh), on the other hand, was started only about 8 months ago, at the start of 2025 by [two](https://tangled.sh/@oppi.li) [brothers](https://tangled.sh/@icyphox.sh).+It's a "social-enabled git collaboration platform" built for decentralisation, ownership, and social coding.The platform has gained a lot of traction since, and the community is very much involved in the development, but for now tangled is still in alpha.···+You can keep ownership of your code, without cutting it off from a popular git platform by running it on a private Gitea or Gitlab server.+The [official docs](https://tangled.sh/@tangled.sh/core/blob/master/docs/knot-hosting.md) give instructions for installation on a NixOS system.+but access to the vast nixpkg catalog lets us do basically anything—with a couple extra steps from time to time.+Since the Spindle runs a Docker container for each workflow run, it needs access to the Docker socket.+They haven't got Docker-in-Docker working quite yet, so it means the Spindle needs to run natively outside a Docker container.+I prefer to have everything containerised on my servers to keep things tidy, but it's fine as a temporary solution until they get DinD working.+What's stopping me right now is rather that workflow runs would spin up a Docker container alongside all my other projects I'd rather not break.+Just create a new repo on tangled—selecting your knot—set the remote on your local repo, and push to it!+If you specified the knot correctly when creating your repo, it should now live directly on your Knot.+<img src="/posts/embracing-atproto-pt2/new-repo.png" alt="Select your new knot when creating a repo" width="80%" style="margin: auto;" />+Just [follow the docs](https://tangled.sh/@tangled.sh/core/blob/master/docs/spindle/pipeline.md), and set the same trigger conditions.+Since spindles work slightly differently to Github Actions runners, we need to give it a list of dependencies to install.+This bit took a bit of trial and error, as you might notice from the `python3` and `gnused` dependencies.+I'd initially set the dependencies to what I set up in the GH workflow, `nodejs` and `pnpm`, plus `deno` to be able to use the `deployctl` cli tool.+This blog uses Nuxt Content to generate HTML from my Markdown files, and Nuxt Content itself uses `better-sqlite3`, which itself needs python and sed in its post-install script.+Since we don't have access to the existing Github Actions, there's a few sections that needed adapting or manual work.+To replace the official Deno Deploy GH Action, we can directly use their `deployctl` cli tool, and give it the appropriate parametres.+I also used this as an excuse to using the `jsr:@std/http/file-server` entrypoint instead of the deno.land url style.+~/.deno/bin/deployctl deploy --project finxol-blog --entrypoint jsr:@std/http/file-server --include=. --prod+Lastly, don't forget to give the workflow permission to deploy by giving it a `DENO_DEPLOY_TOKEN` in the secrets!+Since Deno Deploy integrates only with Github, the permission won't be given automatically here.+~/.deno/bin/deployctl deploy --project finxol-blog --entrypoint jsr:@std/http/file-server --include=. --prod+When pushing to the official knot, the workflow got picked up fine by the official spindle, and showed up in the UI.+When I pushed to my knot however, the official spindle ran the workflow, but it didn't show in the UI.+I thought the spindle wasn't picking up the workflow, but the bug was simply with showing the info in the UI.+[Anirudh](https://tangled.sh/@icyphox.sh) was very quick to find the cause and implement a fix.
public/posts/embracing-atproto-pt2/new-repo.png
public/posts/embracing-atproto-pt2/new-repo.png
This is a binary file and will not be displayed.