DEPRECATED: Use the community maintained https://tangled.sh/@tangled.sh/knot-docker instead

Compare changes

Choose any two refs to compare.

+2
.env.template
···
+
KNOT_SERVER_HOSTNAME=<your hostname>
+
KNOT_SERVER_SECRET=<secret string from the tangled.sh ui>
+1 -1
Dockerfile
···
FROM alpine AS build
-
RUN apk add --update go git
+
RUN apk add --update go git gcc musl-dev
RUN git clone https://tangled.sh/@tangled.sh/core /src
WORKDIR /src
ENV CGO_ENABLED=1
+3 -2
README.md
···
Quick instructions:
- run `gen-key.sh` to generate an ssh host key
-
- set the server name in both `conf/Caddyfile` and in `knot.env.template`
-
- register a knot on tangled.sh and put the secret key in `knot.env.template`
+
- copy `.env.template` to `.env`
+
- set the server name in `.env` to your fully-qualified domain name
+
- register a knot on tangled.sh and put the secret key in `.env`
- spin up the container and test that it works
The default service runs the ssh daemon on port 2222, so I use something
+9 -2
docker-compose.yml
···
services:
frontend:
image: caddy:2-alpine
+
command: >
+
caddy
+
reverse-proxy
+
--from ${KNOT_SERVER_HOSTNAME}
+
--to knotserver:5555
depends_on:
- knotserver
ports:
···
- "80:80"
volumes:
- caddy_data:/data
-
- ./conf:/etc/caddy
+
restart: always
knotserver:
environment:
- KNOT_REPO_SCAN_PATH=/home/git
···
- APPVIEW_ENDPOINT=https://tangled.sh
- KNOT_SERVER_INTERNAL_LISTEN_ADDR=0.0.0.0:5444
- KNOT_SERVER_LISTEN_ADDR=0.0.0.0:5555
-
env_file: knot.env
+
- KNOT_SERVER_HOSTNAME=${KNOT_SERVER_HOSTNAME}
+
- KNOT_SERVER_SECRET=${KNOT_SERVER_SECRET}
build:
dockerfile: Dockerfile
volumes:
- knot_data:/home/git
ports:
- "2222:22"
+
restart: always
volumes:
caddy_data:
knot_data:
-2
knot.env.template
···
-
KNOT_SERVER_HOSTNAME=<your hostname>
-
KNOT_SERVER_SECRET=<secret string from the tangled.sh ui>