Docker config for @recaptime.dev's Knot server on Hack Club Nest. knot.hackclub.community
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: do chowning chaos on knotserver before boot

alongside some tweaks bts on Dockerfile and friends

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.dev>

+14 -4
+4 -2
Dockerfile
··· 26 26 ARG GID=1000 27 27 28 28 COPY rootfs . 29 + COPY motd.txt /home/git/motd 30 + 29 31 RUN chmod 755 /etc && chmod -R 755 /etc/s6-overlay \ 30 32 && apk add shadow s6-overlay execline openssl openssh git curl bash \ 31 33 && groupadd -g $GID -f git \ 32 34 && useradd -u $UID -g $GID -d /home/git git \ 33 35 && openssl rand -hex 16 | passwd --stdin git \ 34 36 && mkdir -p /home/git/repositories && chown -R git:git /home/git \ 35 - && mkdir /app && chown -R git:git /app 37 + && mkdir /app && chown -R git:git /app \ 38 + && chown git:git /home/git/motd 36 39 37 40 COPY --from=builder /usr/bin/knot /usr/bin 38 - COPY motd.txt /home/git/motd 39 41 40 42 HEALTHCHECK --interval=60s --timeout=30s --start-period=5s --retries=3 \ 41 43 CMD curl -f http://localhost:5555 || exit 1
+6 -2
docker-compose.yml
··· 11 11 - .env.production 12 12 volumes: 13 13 - ./keys:/etc/ssh/keys 14 - - ./repositories:/home/git/repositories 15 - - ./server:/app 14 + - knot-repos:/home/git/repositories 15 + - knot-db:/app/db 16 16 ports: 17 17 - "44289:5555" 18 18 - "33939:22" ··· 33 33 # - ./caddy_data:/data 34 34 # restart: always 35 35 # profiles: ["caddy"] 36 + 37 + volumes: 38 + knot-db: 39 + knot-repos:
+4
rootfs/etc/s6-overlay/s6-rc.d/knotserver/run
··· 1 1 #!/command/with-contenv ash 2 2 3 + echo "Fixing permissions before boot" 4 + chown git:git -R /app 5 + chown git:git -R /home/git/repositories 6 + 3 7 exec s6-setuidgid git /usr/bin/knot server