From b388da49cb6782f1f23d1f51f2b2e72bad5b11a4 Mon Sep 17 00:00:00 2001 From: hanna Date: Wed, 4 Jun 2025 14:31:20 -0400 Subject: [PATCH] readme: clean up and make more concise --- readme.md | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/readme.md b/readme.md index a0af60e..9b33713 100644 --- a/readme.md +++ b/readme.md @@ -3,30 +3,45 @@ > **IMPORTANT** > This is a community maintained repository, support is not guaranteed. -Docker container and compose setup to run a [Tangled](https://tangled.sh) knot and host your own data. +Docker container and compose setup to run a [Tangled](https://tangled.sh) knot +and host your own repository data. -## Simple Setup +## Building The Image -If you want an easy way to spin up a knot, you can simply run the following -with docker installed: +By default the `Dockerfile` will build the latest tag, but you can change it +with the `TAG` build argument. -```console -$ docker compose up -d +```sh +docker build -t knot:latest --build-arg TAG=master . ``` -This will setup the knot server, as well as caddy to expose the front-end. +The command above for example will build the latest commit on the `master` +branch. -## Bring Your Own Setup +--- -If you have your own compose setup already, you will just need point your web -server to the knot's HTTP port (namely `5555`), you can do this with docker by -setting another container to `depends_on` it and then pointing it to the name -of the container with the port. For example, with a very basic caddy webserver -container: +This can be done in a compose file as well by specifying it as an build +argument. +```yaml +build: + context: . + args: { TAG: master } ``` -caddy reverse-proxy --from ${KNOT_SERVER_HOSTNAME} --to knot:5555 + +Will tell docker to pass the `TAG` argument to the `Dockerfile` when building. + +## Setting Up The Image + +The simplest way to set up your own knot is to use the provided compose file +and run the following: + +```sh +export KNOT_SERVER_HOSTNAME=example.com +export KNOT_SERVER_SECRET=KNOT_TOKEN_HERE +export KNOT_SERVER_PORT=443 +docker compose up -d ``` -This will for example point caddy to the port on the knot container. +This will setup everything for you including a reverse proxy. -- 2.51.2