+30
-15
readme.md
+30
-15
readme.md
···
3
> **IMPORTANT**
4
> This is a community maintained repository, support is not guaranteed.
5
6
-
Docker container and compose setup to run a [Tangled](https://tangled.sh) knot and host your own data.
7
8
-
## Simple Setup
9
10
-
If you want an easy way to spin up a knot, you can simply run the following
11
-
with docker installed:
12
13
-
```console
14
-
$ docker compose up -d
15
```
16
17
-
This will setup the knot server, as well as caddy to expose the front-end.
18
19
-
## Bring Your Own Setup
20
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
25
-
container:
26
27
```
28
-
caddy reverse-proxy --from ${KNOT_SERVER_HOSTNAME} --to knot:5555
29
```
30
31
-
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.
5
6
+
Docker container and compose setup to run a [Tangled](https://tangled.sh) knot
7
+
and host your own repository data.
8
9
+
## Building The Image
10
11
+
By default the `Dockerfile` will build the latest tag, but you can change it
12
+
with the `TAG` build argument.
13
14
+
```sh
15
+
docker build -t knot:latest --build-arg TAG=master .
16
```
17
18
+
The command above for example will build the latest commit on the `master`
19
+
branch.
20
21
+
---
22
23
+
This can be done in a compose file as well by specifying it as an build
24
+
argument.
25
26
+
```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
```
45
46
+
This will setup everything for you including a reverse proxy.
47