1services:
2 knot:
3 build: .
4 environment:
5 KNOT_SERVER_HOSTNAME: ${KNOT_SERVER_HOSTNAME}
6 KNOT_SERVER_SECRET: ${KNOT_SERVER_SECRET}
7 KNOT_SERVER_DB_PATH: /app/knotserver.db
8 KNOT_REPO_SCAN_PATH: /home/git/repositories
9 KNOT_SERVER_INTERNAL_LISTEN_ADDR: localhost:5444
10 volumes:
11 - ./keys:/etc/ssh/keys
12 - ./repositories:/home/git/repositories
13 - ./server:/app
14 ports:
15 - 5555:5555
16 - 2222:22
17 restart: always
18 frontend:
19 image: caddy:alpine
20 command: >
21 caddy
22 reverse-proxy
23 --from ${KNOT_SERVER_HOSTNAME}
24 --to knot:5555
25 depends_on:
26 - knot
27 ports:
28 - ${KNOT_SERVER_PORT:-443}:443
29 - ${KNOT_SERVER_PORT:-443}:443/udp
30 volumes:
31 - caddy_data:/data
32 restart: always
33 profiles: ["caddy"]