-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod.yaml
145 lines (133 loc) · 2.88 KB
/
docker-compose-prod.yaml
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
#
# docker-compose-prod.yaml (PRODUCTION)
# https://github.com/COSI-Lab/
#
services:
# --- Log server ---
log-server:
build: ./mirrorlog
container_name: mirrorlog
restart: unless-stopped
expose:
- 4001
volumes:
- "./logs:/mirror/logs"
- "./configs:/mirror/configs:ro"
networks:
- mirror
# --- Website ---
website:
build: ./mirror-website
container_name: mirror-website
restart: unless-stopped
expose:
- 8000
networks:
- mirror
volumes:
- "./configs:/home/mirror/configs:ro"
# --- Website static file server / proxy ---
website_proxy:
build:
context: ./mirror-website
dockerfile: proxy.Dockerfile
container_name: mirror-website-proxy
restart: unless-stopped
ports:
- "127.0.0.1:30301:80"
networks:
- mirror
depends_on:
- website
# --- Map ---
map:
build: ./mirror-map
container_name: mirror-map
restart: unless-stopped
ports:
- "30302:8080"
volumes:
- "./configs:/mirror/configs:ro"
- "geolite2:/mirror/GeoLite2City"
networks:
- mirror
depends_on:
- log-server
- metrics
# --- Sync scheduler ---
sync-scheduler:
build: ./mirror-sync-scheduler
container_name: mirror-sync-scheduler
restart: unless-stopped
volumes:
- "/storage:/storage"
- "./configs:/mirror/configs:ro"
- "./scripts:/mirror/scripts:ro"
networks:
- mirror
depends_on:
- log-server
stdin_open: true
tty: true
# --- Torrent handler ---
# torrent-handler:
# build: ./mirror-torrent-handler
# container_name: mirror-torrent-handler
# restart: unless-stopped
# volumes:
# - "/storage:/storage"
# - "./configs:/mirror/configs:ro"
# networks:
# - mirror
# depends_on:
# - log-server
# --- Metrics engine ---
metrics:
build: ./mirror-metrics
container_name: mirror-metrics
restart: unless-stopped
expose:
- 8080
- 8081
volumes:
- "/var/log/nginx:/mirror/nginx:ro"
- "metrics:/mirror/data"
networks:
- mirror
depends_on:
- log-server
# --- Prometheus DB ---
prometheus:
image: prom/prometheus:latest
container_name: mirror-prometheus
restart: unless-stopped
expose:
- 9090
volumes:
- "./configs/prometheus.yml:/etc/prometheus/prometheus.yml:ro"
- "prometheus:/prometheus"
networks:
- mirror
depends_on:
- metrics
# --- Grafana ---
grafana:
image: grafana/grafana:latest
container_name: mirror-grafana
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000"
volumes:
- "grafana:/var/lib/grafana"
networks:
- mirror
depends_on:
- prometheus
networks:
mirror:
external: true
volumes:
prometheus: {}
grafana: {}
metrics: {}
geolite2: {}