-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
174 lines (161 loc) · 3.6 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
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
version: "3"
services:
sjtu-plus:
restart: unless-stopped
networks:
- wsgi_net
- plus_net
build: ./sjtu-plus
image: sjtu-plus/sjtu-plus:1.0
expose:
- 5000
env_file:
- ./secrets/postgres-db.env
- ./secrets/sjtu-plus.env
volumes:
- "./statics/static:/data"
- "./sjtu-plus:/root/app"
depends_on:
- postgres-db
caddy:
restart: unless-stopped
networks:
- wsgi_net
build: ./caddy
volumes:
- "./statics:/srv:ro"
- "./data:/data"
depends_on:
- sjtu-plus
ports:
- 80:80
- 443:443
sjtu-traffic-exporter:
restart: unless-stopped
networks:
- prometheus_net
- wsgi_net
build: ./services/sjtu_traffic_exporter
environment:
- PLUS_HOST=sjtu-plus.internal
external_links:
- "caddy:sjtu-plus.internal"
depends_on:
- caddy
expose:
- 9142
prometheus:
user: root
image: prom/prometheus:v2.25.2
command: --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/data/prometheus
networks:
- prometheus_net
volumes:
- "./prometheus.yml:/etc/prometheus/prometheus.yml"
- prometheus-storage:/data
depends_on:
- sjtu-traffic-exporter
expose:
- 9090
restart: unless-stopped
prometheus-private:
user: root
image: prom/prometheus:v2.25.2
command: --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/data/prometheus
networks:
- prometheus_private_net
- host_monitor_net
volumes:
- "./prometheus.private.yml:/etc/prometheus/prometheus.yml"
- prometheus-private-storage:/data
expose:
- 9090
restart: unless-stopped
postgres-db:
image: postgres
networks:
- plus_net
expose:
- 5432
restart: unless-stopped
env_file:
- ./secrets/postgres-db.env
environment:
- PGDATA=/data/database
volumes:
- "./data:/data"
grafana:
user: root
image: grafana/grafana:7.5.1
networks:
- wsgi_net
- prometheus_net
volumes:
- grafana-storage:/var/lib/grafana
- "./secrets/grafana.ini:/etc/grafana/grafana.ini"
depends_on:
- prometheus
expose:
- 3000
restart: unless-stopped
grafana-private:
user: root
image: grafana/grafana:7.5.1
networks:
- wsgi_net
- prometheus_private_net
volumes:
- grafana-private-storage:/var/lib/grafana
- "./secrets/grafana-private.ini:/etc/grafana/grafana.ini"
depends_on:
- prometheus-private
expose:
- 3000
restart: unless-stopped
captcha-solver:
restart: unless-stopped
networks:
- wsgi_net
build: ./captcha-solver
image: captcha-solver/captcha-solver
expose:
- 8080
influxdb:
image: influxdb:2.0
ports:
- "127.0.0.1:8086:8086"
networks:
- wsgi_net
- influxdb_net
volumes:
- influxdb-storage-data:/var/lib/influxdb2
- influxdb-storage-config:/etc/influxdb2
restart: unless-stopped
influx-everything:
build:
context: ./services/influx-everything
networks:
- influxdb_net
restart: unless-stopped
env_file:
- ./secrets/influx-everything.env
volumes:
influxdb-storage-data:
influxdb-storage-config:
chronograf-storage:
grafana-storage:
grafana-private-storage:
prometheus-storage:
prometheus-private-storage:
networks:
wsgi_net:
plus_net:
prometheus_net:
influxdb_net:
prometheus_private_net:
host_monitor_net:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.31.0.0/16