-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
206 lines (193 loc) · 5.5 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
version: '3'
services:
mysql:
image: 'mysql:latest'
ports:
- 8091:3306
environment:
- MYSQL_DATABASE=Tiktok
- MYSQL_USER=tiktok
- MYSQL_PASSWORD=password
- MYSQL_RANDOM_ROOT_PASSWORD="yes"
volumes:
- /etc/timezone:/etc/timezone
- /etc/localtime:/etc/localtime
Etcd:
image: 'bitnami/etcd:latest'
environment:
- ALLOW_NONE_AUTHENTICATION=yes
ports:
- 2379:2379
# Open telemetry
otel-collector:
image: otel/opentelemetry-collector-contrib-dev:latest
command: [ "--config=/etc/otel-collector-config.yml", "${OTELCOL_ARGS}" ]
volumes:
- ./config/otel-collector-config.yml:/etc/otel-collector-config.yml
ports:
- "1888:1888" # pprof extension
- "8888:8888" # Prometheus metrics exposed by the collector
- "8889:8889" # Prometheus exporter metrics
- "13133:13133" # health_check extension
- "4317:4317" # OTLP gRPC receiver
- "55670:55679" # zpages extension
depends_on:
- jaeger-all-in-one
# Jaeger
jaeger-all-in-one:
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686"
- "14268"
- "14250:14250"
- "6831:6831"
# Victoriametrics
# open source time series database & monitoring solution
victoriametrics:
container_name: victoriametrics
image: victoriametrics/victoria-metrics
ports:
- "8428:8428"
- "8089:8089"
- "8089:8089/udp"
- "2003:2003"
- "2003:2003/udp"
- "4242:4242"
command:
- '--storageDataPath=/storage'
- '--graphiteListenAddr=:2003'
- '--opentsdbListenAddr=:4242'
- '--httpListenAddr=:8428'
- '--influxListenAddr=:8089'
restart: always
# Grafana
# 数据可视化工具,数据监控,数据统计
# “3000:3000"表示端口映射
# 第一个为外部端口,第一个为内部端口号
grafana:
image: grafana/grafana:latest
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
ports:
- "3000:3000"
# starts 4 docker containers running minio server instances.
# using nginx reverse proxy, load balancing, you can access
# it through port 9000.
# 高性能对象存储
minio1:
image: quay.io/minio/minio:latest
command: server --console-address ':9001' http://minio{1...4}/data{1...2}
expose:
- "9000"
- "9001" # TODO 不暴露9001端口号
privileged: true
environment:
MINIO_ROOT_USER: tiktokMinio
MINIO_ROOT_PASSWORD: tiktokMinio
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
hostname: minio1
volumes:
- ./data/data1-1:/data1
- ./data/data1-2:/data2
- /usr/share/zoneinfo:/usr/share/zoneinfo
- ./build.sh:/usr/build.sh
minio2:
image: quay.io/minio/minio:latest
command: server --console-address ":9001" http://minio{1...4}/data{1...2}
expose:
- "9000"
- "9001" # TODO 不暴露9001端口号
environment:
MINIO_ROOT_USER: tiktokMinio
MINIO_ROOT_PASSWORD: tiktokMinio
SET_CONTAINER_TIMEZONE: true
CONTAINER_TIMEZONE: Asia/Shanghai
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
hostname: minio2
volumes:
- ./data/data2-1:/data1
- ./data/data2-2:/data2
- /usr/share/zoneinfo:/usr/share/zoneinfo
- ./build.sh:/usr/build.sh
minio3:
image: quay.io/minio/minio:latest
command: server --console-address ':9001' http://minio{1...4}/data{1...2}
expose:
- "9000"
- "9001" # TODO 不暴露9001端口号
environment:
MINIO_ROOT_USER: tiktokMinio
MINIO_ROOT_PASSWORD: tiktokMinio
SET_CONTAINER_TIMEZONE: true
CONTAINER_TIMEZONE: Asia/Shanghai
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
hostname: minio3
volumes:
- ./data/data3-1:/data1
- ./data/data3-2:/data2
- /usr/share/zoneinfo:/usr/share/zoneinfo
- ./build.sh:/usr/build.sh
minio4:
image: quay.io/minio/minio:latest
command: server --console-address ":9001" http://minio{1...4}/data{1...2}
expose:
- "9000"
- "9001" # TODO 不暴露9001端口号
environment:
MINIO_ROOT_USER: tiktokMinio
MINIO_ROOT_PASSWORD: tiktokMinio
SET_CONTAINER_TIMEZONE: true
CONTAINER_TIMEZONE: Asia/Shanghai
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
hostname: minio4
volumes:
- ./data/data4-1:/data1
- ./data/data4-2:/data2
- /usr/share/zoneinfo:/usr/share/zoneinfo
- ./build.sh:/usr/build.sh
nginx:
environment:
TZ: Asia/Shanghai
image: nginx:alpine
hostname: nginx
volumes:
- ./config/nginx.conf:/etc/nginx/nginx.conf:ro
- ./log/nginx:/var/log/nginx:rw
- ./data/cache/nginx:/usr/local/nginx/conf/cache:rw
ports:
- "9000:9000"
- "9001:9001"
depends_on:
- minio1
- minio2
- minio3
- minio4
# ## By default this config uses default local driver,
# ## For custom volumes replace with volume driver configuration.
# volumes:
# data1-1:
# data1-2:
# data2-1:
# data2-2:
# data3-1:
# data3-2:
# data4-1:
# data4-2: