-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
93 lines (88 loc) · 2.4 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
version: "3.9"
services:
rsync-cron:
build:
context: ./.docker
dockerfile: rs-cron.Dockerfile
container_name: rsync-cron-ubuntu
restart: always
volumes:
- ./log:/var/log
- /mnt/nas/mirror:/mnt/mirror/
networks:
- homenetwork
rsync-crond:
build:
context: ./rsync-cron-alpine
dockerfile: Dockerfile
image: rsync-crond-alpine:latest
container_name: rsync-crondaemon
restart: always
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Singapore
volumes:
- ./rsync-cron-alpine/scripts/hello-world:/etc/periodic/1min/:ro
- ./rsync-cron-alpine/mirror:/etc/periodic/mirror/:ro
- /mnt/nas/mirror:/mnt/mirror/
networks:
- homenetwork
rsyncd:
build:
context: ./rsyncd
dockerfile: rsyncd.Dockerfile
container_name: rsyncd
restart: always
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Singapore
volumes:
- ./rsyncd/config:/config
- ./rsyncd/log:/log
- /mnt/nas/mirror/pub:/data
networks:
- homenetwork
ports:
- "873:873"
caddy2:
image: caddy:2.4.6-alpine
container_name: caddy2-mirror
cap_add:
- NET_ADMIN
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Singapore
restart: always
volumes:
- ./caddy/caddy:/etc/caddy
- ./caddy/site:/srv
- caddy_data:/data
- caddy_config:/config
- /mnt/nas/mirror/pub:/var/www/mirror
networks:
- homenetwork
ports:
- "9004:80"
- "9005:443"
labels:
- traefik.enable=true
- traefik.http.routers.nginx-mirror.rule=Host(`mirror.jingk.ai`)
- traefik.http.routers.nginx-mirror.entrypoints=http
- traefik.http.routers.nginx-mirror.service=nginx-mirror-service
- traefik.http.services.nginx-mirror-service.loadbalancer.server.port=80
# We already have an existing traefik infront of us
# In that case since caddy provisions the ssl cert for mirror.jingk.ai from lets encrypt
# We tell traefik to run in L4 mode and forward traffic to caddy.
- "traefik.tcp.routers.nginx-mirrors.rule=HostSNI(`mirror.jingk.ai`)"
- "traefik.tcp.routers.nginx-mirrors.tls.passthrough=true"
- "traefik.tcp.services.nginx-mirrors.loadbalancer.server.port=443"
volumes:
caddy_data:
external: true
caddy_config:
networks:
homenetwork:
external: true