···3> **IMPORTANT**
4> This is a community maintained repository, support is not guaranteed.
56-Docker container and compose setup to run a [Tangled](https://tangled.sh) knot and host your own data.
078-## Simple Setup
910-If you want an easy way to spin up a knot, you can simply run the following
11-with docker installed:
1213-```console
14-$ docker compose up -d
15```
1617-This will setup the knot server, as well as caddy to expose the front-end.
01819-## Bring Your Own Setup
2021-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
25-container:
26000027```
28-caddy reverse-proxy --from ${KNOT_SERVER_HOSTNAME} --to knot:5555
00000000000029```
3031-This will for example point caddy to the port on the knot container.
32
···3> **IMPORTANT**
4> This is a community maintained repository, support is not guaranteed.
56+Docker container and compose setup to run a [Tangled](https://tangled.sh) knot
7+and host your own repository data.
89+## Building The Image
1011+By default the `Dockerfile` will build the latest tag, but you can change it
12+with the `TAG` build argument.
1314+```sh
15+docker build -t knot:latest --build-arg TAG=master .
16```
1718+The command above for example will build the latest commit on the `master`
19+branch.
2021+---
2223+This can be done in a compose file as well by specifying it as an build
24+argument.
0002526+```yaml
27+build:
28+ context: .
29+ args: { TAG: master }
30```
31+32+Will tell docker to pass the `TAG` argument to the `Dockerfile` when building.
33+34+## Setting Up The Image
35+36+The simplest way to set up your own knot is to use the provided compose file
37+and run the following:
38+39+```sh
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
44```
4546+This will setup everything for you including a reverse proxy.
47