···
> This is a community maintained repository, support is not guaranteed.
6
-
Docker container and compose setup to run a [Tangled](https://tangled.sh) knot and host your own data.
6
+
Docker container and compose setup to run a [Tangled](https://tangled.sh) knot
7
+
and host your own repository data.
9
+
## Building The Image
10
-
If you want an easy way to spin up a knot, you can simply run the following
11
-
with docker installed:
11
+
By default the `Dockerfile` will build the latest tag, but you can change it
12
+
with the `TAG` build argument.
14
-
$ docker compose up -d
15
+
docker build -t knot:latest --build-arg TAG=master .
17
-
This will setup the knot server, as well as caddy to expose the front-end.
18
+
The command above for example will build the latest commit on the `master`
19
-
## Bring Your Own Setup
21
-
If you have your own compose setup already, you will just need point your web
22
-
server to the knot's HTTP port (namely `5555`), you can do this with docker by
23
-
setting another container to `depends_on` it and then pointing it to the name
24
-
of the container with the port. For example, with a very basic caddy webserver
23
+
This can be done in a compose file as well by specifying it as an build
29
+
args: { TAG: master }
28
-
caddy reverse-proxy --from ${KNOT_SERVER_HOSTNAME} --to knot:5555
32
+
Will tell docker to pass the `TAG` argument to the `Dockerfile` when building.
34
+
## Setting Up The Image
36
+
The simplest way to set up your own knot is to use the provided compose file
37
+
and run the following:
40
+
export KNOT_SERVER_HOSTNAME=example.com
41
+
export KNOT_SERVER_SECRET=KNOT_TOKEN_HERE
42
+
export KNOT_SERVER_PORT=443
43
+
docker compose up -d
31
-
This will for example point caddy to the port on the knot container.
46
+
This will setup everything for you including a reverse proxy.