-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.zhiyuan.yml
177 lines (163 loc) · 3.76 KB
/
docker-compose.zhiyuan.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
services:
frontend:
build:
args:
- SITE_NAME=Zhiyuan
container_name: zhiyuan-frontend
mem_limit: 1G
memswap_limit: 1G
caddy:
container_name: zhiyuan-caddy
volumes:
- "/mnt/data12T:/mnt:ro"
- "./caddy/Caddyfile.zhiyuan:/etc/caddy/Caddyfile:ro"
mem_limit: 20G
memswap_limit: 20G
lug:
container_name: zhiyuan-lug
volumes:
- "/mnt/data12T:/mnt"
- "./config.zhiyuan.yaml:/config.yaml:ro"
environment:
MIRROR_CLONE_SITE: "mirrors.sjtug.sjtu.edu.cn"
mem_limit: 10G
memswap_limit: 10G
rsync-gateway:
container_name: zhiyuan-rsync-gateway
volumes:
- "./rsync-gateway/config.zhiyuan.toml:/app/config.toml:ro"
mem_limit: 5G
memswap_limit: 5G
postgres:
container_name: zhiyuan-postgres
volumes:
- './postgresql.zhiyuan.conf:/etc/postgresql/postgresql.conf:ro'
- "/mnt/data12T/postgres-data:/var/lib/postgresql/data"
mem_limit: 10G
memswap_limit: 10G
cadvisor:
container_name: zhiyuan-cadvisor
clash:
container_name: zhiyuan-clash
mirror-intel:
container_name: zhiyuan-mirror-intel
volumes:
- "/mnt/cache:/mnt/cache"
mem_limit: 10G
memswap_limit: 10G
tunnel:
container_name: zhiyuan-tunnel
restart: unless-stopped
image: v2ray/official
expose:
- 5000
- 5001
- 5002
- 5006
ports:
- "127.0.0.1:5000:5000"
networks:
- tunnel-net
volumes:
- "./secrets/v2ray.json:/etc/v2ray/config.json:z,ro"
logging:
options:
max-size: "4M"
max-file: "20"
ulimits:
nofile:
soft: 80000
hard: 120000
mem_limit: 2G
memswap_limit: 2G
rsyncd:
container_name: zhiyuan-rsyncd
volumes:
- ./rsyncd/rsyncd.zhiyuan.conf:/etc/rsyncd.conf:ro
- /mnt/data12T:/mnt:ro
- ./rsyncd/motd.zhiyuan:/etc/rsync/motd:ro
blkio_config:
weight: 10
device_read_bps:
- path: /dev/mapper/vg0-mirror.sjtug
rate: '10mb'
device_read_iops:
- path: /dev/mapper/vg0-mirror.sjtug
rate: 20
git-backend:
container_name: zhiyuan-git-backend
volumes:
- "/mnt/data12T/git:/git:z"
mem_limit: 1G
memswap_limit: 1G
k8s-registry:
container_name: zhiyuan-k8s-registry
restart: unless-stopped
image: registry:2.8
networks:
- ipv6-service-net
- proxy-net
expose:
- 80
- 5001
volumes:
- "./secrets/k8s-registry.yml:/etc/docker/registry/config.yml"
environment:
http_proxy: http://clash:8080
https_proxy: http://clash:8080
HTTP_PROXY: http://clash:8080
HTTPS_PROXY: http://clash:8080
logging:
options:
max-size: "4M"
max-file: "20"
ulimits:
nofile:
soft: 80000
hard: 120000
mem_limit: 5G
memswap_limit: 5G
docker-registry:
container_name: zhiyuan-docker-registry
restart: unless-stopped
image: registry:2.8
networks:
- ipv6-service-net
- proxy-net
expose:
- 80
- 5001
volumes:
- "./secrets/docker-registry.yml:/etc/docker/registry/config.yml"
environment:
http_proxy: http://clash:8080
https_proxy: http://clash:8080
HTTP_PROXY: http://clash:8080
HTTPS_PROXY: http://clash:8080
logging:
options:
max-size: "4M"
max-file: "20"
ulimits:
nofile:
soft: 80000
hard: 120000
mem_limit: 5G
memswap_limit: 5G
networks:
host-monitor-net:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.31.0.0/16
monitor-net:
tunnel-net:
proxy-net:
ipv6-service-net:
enable_ipv6: true
driver: bridge
ipam:
driver: default
config:
- subnet: fd01::/80