Community maintained Docker config for the spindle server

readme: clean up and make more concise

hanna b388da49 4df30487

Changed files
+30 -15
+30 -15
readme.md
···
> **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.