+3
.gitmodules
+3
.gitmodules
+22
README.md
+22
README.md
···
1
+
# Tangled.sh Knot
2
+
3
+
These are the config files for the Tangled knot hosted at [knot.ionchy.ca](https://knot.ionchy.ca).
4
+
5
+
## Docker installation
6
+
7
+
1. In `knot-docker` diretory, create Docker image with `docker build -t knot:latest --build-arg TAG=master .`
8
+
2. In this directory, create bind mount directories with `mkdir keys repositories server`
9
+
3. Ensure `repositories` and `server` are owned by a USER with UID/GUID `1000:1000`
10
+
with `chown USER:USER repositories server`
11
+
4. Edit `docker-compose.yml` with appropriate `KNOT_SERVER_HOSTNAME` and `KNOT_SERVER_OWNER`
12
+
4. Create Docker container with `docker-compose up -d`
13
+
5. Knot is now ready for reverse proxy from `KNOT_SERVER_HOSTNAME:443` to local port 5555
14
+
(knot verification will not work over HTTP port 80!)
15
+
16
+
## Repository troubleshooting
17
+
18
+
* SSH keys must be added to Tangled *after* the knot is created for it to pick them up.
19
+
Run `docker exec knot knot keys` to verify the keys.
20
+
* Git remote URLs must be of the form `ssh://git@KNOT_SERVER_HOSTNAME:2222/KNOT_SERVER_OWNER/REPO`
21
+
since the container exposes port 2222 for Git.
22
+
Remember to allow the port through your firewall.
+18
docker-compose.yml
+18
docker-compose.yml
···
1
+
services:
2
+
knot:
3
+
image: knot:latest
4
+
container_name: knot
5
+
environment:
6
+
KNOT_SERVER_HOSTNAME: knot.ionchy.ca
7
+
KNOT_SERVER_OWNER: did:plc:ypsrm6ue6o5xk5kvbdhwtppm
8
+
KNOT_SERVER_DB_PATH: /app/knotserver.db
9
+
KNOT_REPO_SCAN_PATH: /home/git/repositories
10
+
KNOT_SERVER_INTERNAL_LISTEN_ADDR: localhost:5444
11
+
volumes:
12
+
- ./keys:/etc/ssh/keys
13
+
- ./repositories:/home/git/repositories
14
+
- ./server:/app
15
+
ports:
16
+
- "5555:5555"
17
+
- "2222:22"
18
+
restart: always