-
Notifications
You must be signed in to change notification settings - Fork 0
/
opensuse-mirror.yml
112 lines (106 loc) · 3.16 KB
/
opensuse-mirror.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
version: "3.5"
services:
opensuse-nginx-download:
image: opensusebr/mirror-nginx-download
volumes:
- opensuse-fancyindex:/srv/www/fancyindex
- opensuse-data:/srv/pub/opensuse/
networks:
- traefik
ulimits:
nofile:
soft: 120000
hard: 120000
deploy:
replicas: 1
resources:
limits:
cpus: '0.50'
memory: 1024M
reservations:
cpus: '0.25'
memory: 256M
labels:
- traefik.enable=true
- traefik.docker.network=traefik
# https config
- traefik.http.routers.download-https.rule=Host(`download.opensuse.net.br`) || Host(`rsync.opensuse.net.br`) || Host(`opensuse.net.br`)
- traefik.http.routers.download-https.entrypoints=https
- traefik.http.routers.download-https.tls=true
- traefik.http.routers.download-https.tls.certresolver=letsencrypt
- traefik.http.routers.download-https.service=download
# http config
- traefik.http.routers.download-http.rule=Host(`download.opensuse.net.br`) || Host(`rsync.opensuse.net.br`) || Host(`opensuse.net.br`)
- traefik.http.routers.download-http.entrypoints=http
- traefik.http.routers.download-http.service=download
# service config
- traefik.http.services.download.loadbalancer.server.port=80
opensuse-rsync-server:
image: opensusebr/mirror-rsync-server
volumes:
- opensuse-data:/srv/pub/opensuse/
networks:
- traefik
deploy:
replicas: 1
resources:
limits:
cpus: '0.25'
memory: 256M
reservations:
cpus: '0.10'
memory: 64M
labels:
- traefik.enable=true
- traefik.docker.network=traefik
# tcp config
- traefik.tcp.routers.content-tcp.rule=HostSNI(`*`)
- traefik.tcp.routers.content-tcp.entrypoints=rsync
- traefik.tcp.routers.content-tcp.service=content
# service config
- traefik.tcp.services.content.loadbalancer.server.port=873
opensuse-rsync-transfer:
image: opensusebr/mirror-rsync-transfer
environment:
RSYNC_HOST: stage-main-repos.opensuse.org
RSYNC_MODULE: opensuse-full-really-everything-including-repositories
RSYNC_PATH: /opensuse/
RSYNC_USER: opensuse
RSYNC_PASSWORD:
configs:
- source: opensuse-rsync-include
target: /etc/rsync-include.txt
volumes:
- opensuse-data:/srv/pub/opensuse/
networks:
- traefik
deploy:
mode: replicated
replicas: 0
resources:
limits:
cpus: '0.75'
memory: 1024M
reservations:
cpus: '0.20'
memory: 128M
labels:
- "swarm.cronjob.enable=true"
# run every 15 min
- "swarm.cronjob.schedule=*/15 * * * *"
- "swarm.cronjob.skip-running=true"
# limit replicas to one, rsync can't run in parallel
- "swarm.cronjob.replicas=1"
restart_policy:
condition: none
configs:
opensuse-rsync-include:
external: true
networks:
traefik:
external: true
volumes:
opensuse-fancyindex:
external: true
opensuse-data:
external: true