This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yml
230 lines (213 loc) · 6.05 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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
version: '3.7'
networks:
tiktok:
driver: bridge
services:
mysql:
container_name: mysql
image: mysql:latest
restart: always
command: --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=tiktok
- MYSQL_USER=tiktok
- MYSQL_PASSWORD=tiktok
- TZ=Asia/Shanghai
volumes:
- ./config/sql:/docker-entrypoint-initdb.d/
- ./data/mysql:/var/lib/mysql
ports:
- "3306:3306"
networks:
- tiktok
redis:
container_name: redis
image: "redis:latest"
restart: always
ports:
- 6379:6379
volumes:
- ./data/redis:/data
environment:
- REDIS_PASSWORD=tiktok
- ALLOW_EMPTY_PASSWORD=no
networks:
- tiktok
rabbitmq:
container_name: rabiitmq
image: "rabbitmq:latest"
ports:
- 5672:5672
- 15672:15672
environment:
- RABBITMQ_DEFAULT_USER=tiktok
- RABBITMQ_DEFAULT_PASS=tiktok
volumes:
- ./data/rabbitmq:/var/lib/rabbitmq
networks:
- tiktok
etcd:
container_name: etcd
image: "quay.io/coreos/etcd:v3.5.5"
restart: always
ports:
- 2379:2379
- 2380:2380
environment:
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
- ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379
- ETCD_API=3
- ALLOW_NONE_AUTHENTICATION=yes
volumes:
- ./docker:/script
- ./config:/config
- ./data/etcd:/etcd-data
networks:
- tiktok
entrypoint: ["sh", "-c", "chmod +x /script/etcd-monitor.sh && /script/etcd-monitor.sh & exec etcd"]
etcd-keeper:
hostname: etcdkeeper
image: evildecay/etcdkeeper
environment:
- ETCD_HOSTS=http://etcd:2379
- SW_STORAGE_ETCD_CLUSTER_NODES=etcd:2379
- HOST=0.0.0.0
- HOSTNAME=etcd-keeper
links:
- etcd
ports:
- 8099:8080
depends_on:
- etcd
networks:
- tiktok
elasticsearch:
image: elasticsearch:8.4.2
container_name: elasticsearch
environment:
bootstrap.memory_lock: "true"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
discovery.type: single-node
ingest.geoip.downloader.enabled: "false"
TZ: Asia/Shanghai
xpack.security.enabled: "false"
healthcheck:
test: ["CMD-SHELL", "curl -sf http://elasticsearch:9200/_cluster/health || exit 1"] # ⼼跳检测,成功之后不再执⾏后⾯的退出
interval: 60s # ⼼跳检测间隔周期
timeout: 10s
retries: 3
start_period: 60s # ⾸次检测延迟时间
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./config/elasticsearch:/usr/share/elasticsearch/config
- ./data/elasticsearch:/usr/share/elasticsearch/data
ports:
- "9200:9200"
restart: always
networks:
- tiktok
kibana:
image: kibana:8.4.2
container_name: kibana
environment:
- I18N_LOCALE=zh-CN
- XPACK_GRAPH_ENABLED=true
- TIMELION_ENABLED=true
- XPACK_MONITORING_COLLECTION_ENABLED="true"
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
depends_on:
- elasticsearch
ports:
- "5601:5601"
volumes:
- ./config/kibana:/usr/share/kibana/config
- ./data/kibana:/usr/share/kibana/data
networks:
- tiktok
jaeger:
container_name: jaeger
image: "jaegertracing/all-in-one:latest"
restart: always
ports:
- 16686:16686
- 6831:6831/udp
volumes:
- ./data/jaeger:/var/lib/jaeger
- ./config/jaeger:/etc/jaeger
networks:
- tiktok
prometheus:
image: prom/prometheus
container_name: prometheus
hostname: prometheus
restart: always
volumes:
- ./config/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- 9090:9090
networks:
- tiktok
grafana:
image: grafana/grafana
container_name: grafana
restart: always
ports:
- 3000:3000
volumes:
- ./config/grafana:/etc/grafana
networks:
- tiktok
alertmanager: #预警模块
image: prom/alertmanager
container_name: alertmanager
restart: always
ports:
- 9093:9093
networks:
- tiktok
node-exporter:
image: quay.io/prometheus/node-exporter
container_name: node-exporter
restart: always
ports:
- 9100:9100
networks:
- tiktok
cadvisor:
image: google/cadvisor:latest
container_name: cadvisor
restart: always
platform: linux/amd64
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
ports:
- 8899:8080
networks:
- tiktok
redis-exporter:
image: oliver006/redis_exporter
container_name: redis-exporter
restart: always
ports:
- 9121:9121
command:
- "--redis.addr=redis://127.0.0.1:6379"
networks:
- tiktok
mysql_xporter:
image: prom/mysqld-exporter
container_name: mysql-exporter
restart: always
ports:
- 9104:9104
environment:
DATA_SOURCE_NAME: 'exporter:123456@(127.0.0.1:3306)'
networks:
- tiktok