-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
248 lines (233 loc) · 6.22 KB
/
docker-compose.yaml
File metadata and controls
248 lines (233 loc) · 6.22 KB
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
version: '3'
services:
# Etcd
etcd:
image: docker.1ms.run/bitnami/etcd:3.5.20
container_name: etcd
ports:
- "3379:2379"
- "3380:2380"
environment:
- ETCD_ENABLE_V2=true
- ALLOW_NONE_AUTHENTICATION=yes
- ETCD_ADVERTISE_CLIENT_URLS=http://${HOST_IP}:3379 # 宿主机地址
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
- ETCD_NAME=etcd
volumes:
- ./components/etcd/data:/bitnami/etcd/data
- ./components/etcd/logs:/bitnami/etcd/logs
networks:
pai-pai:
# Redis
redis:
image: docker.1ms.run/redis:alpine3.18
ports:
- 16379:6379
container_name: redis
volumes:
- ./components/redis/data:/data
- ./components/redis/config/redis.conf:/usr/local/redis/config/redis.conf
environment:
TZ: Asia/Shanghai
restart: always
networks:
pai-pai:
command: redis-server --requirepass paipai --appendonly yes
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 3
# MySQL
mysql:
image: docker.1ms.run/mysql:8.0
ports:
- 13306:3306
container_name: mysql
volumes:
- ./components/mysql/data:/var/lib/mysql
- /etc/localtime:/etc/localtime
environment:
MYSQL_ROOT_PASSWORD: 123456 # MySQL-root密码
restart: always
networks:
pai-pai:
# MongoDB
mongo:
image: docker.1ms.run/mongo:4.0
container_name: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: paipai
ports:
- 47017:27017
volumes:
- ./components/mongo/data:/data/db
- /etc/localtime:/etc/localtime
restart: always
networks:
pai-pai:
# Zookeeper
zookeeper:
image: docker.1ms.run/wurstmeister/zookeeper
ports:
- 2181:2181
container_name: zookeeper
volumes:
- /etc/localtime:/etc/localtime
environment:
TZ: Asia/Shanghai
restart: always
networks:
pai-pai:
# Kafka
kafka:
image: docker.1ms.run/wurstmeister/kafka
container_name: kafka
restart: always
ports:
- 9092:9092
environment:
TZ: Asia/Shanghai
KAFKA_BROKER_ID: 0
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "ws2ms_chat:8:1,ms2ps_chat:8:1,msg_to_mongo:8:1"
KAFKA_ADVERTISED_LISTENERS: INSIDE://${HOST_IP}:9092 # 宿主机地址
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT"
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
KAFKA_LISTENERS: INSIDE://:9092
KAFKA_HEAP_OPTS: "-Xmx512M -Xms256M"
depends_on:
- zookeeper
networks:
pai-pai:
# apisix-仪表盘
apisix-dashboard:
image: docker.1ms.run/apache/apisix-dashboard:3.0.1-alpine
container_name: apisix-dashboard
restart: always
depends_on:
- etcd
volumes:
- ./components/apisix-dashboard/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml
- ./components/apisix-dashboard/schema.json:/usr/local/apisix-dashboard/api/conf/
ports:
- "9000:9000"
networks:
pai-pai:
# apisix
apisix:
image: docker.1ms.run/apache/apisix:latest
container_name: apisix
restart: always
depends_on:
- etcd
- apisix-dashboard
volumes:
- ./components/apisix/conf/config.yaml:/usr/local/apisix/conf/config.yaml
- ./components/apisix/logs:/usr/local/apisix/logs
- ./components/apisix/cert/ssl_PLACE_HOLDER.crt:/usr/local/apisix/conf/cert/ssl_PLACE_HOLDER.crt
- ./components/apisix/cert/ssl_PLACE_HOLDER.key:/usr/local/apisix/conf/cert/ssl_PLACE_HOLDER.key
ports:
- "9180:9180/tcp"
- "9080:9080/tcp"
- "9091:9091/tcp"
- "9443:9443/tcp"
- "9093:9092/tcp"
networks:
pai-pai:
# sail
sail:
image: ccr.ccs.tencentyun.com/hyy-yu/sail:latest
container_name: sail
ports:
- "8108:8108"
volumes:
- "./components/sail/compose-cfg.toml:/app/cfg.toml"
restart: always
platform: linux/arm64
# jeager
jeager:
image: docker.1ms.run/jaegertracing/all-in-one:latest
container_name: jeager
ports:
- "5775:5775/udp"
- "6831:6831/udp"
- "6832:6832/udp"
- "5778:5778"
- "16686:16686"
- "14268:14268"
- "9411:9411"
restart: always
networks:
pai-pai:
# elasticsearch
elasticsearch:
image: docker.1ms.run/elasticsearch:7.17.4
volumes:
- /etc/localtime:/etc/localtime
- ./components/elasticsearch/data:/usr/share/elasticsearch/data
ports:
- '9200:9200'
- '9300:9300'
container_name: elasticsearch
restart: always
environment:
- 'cluster.name=elasticsearch'
- 'discovery.type=single-node'
- 'ES_JAVA_OPTS=-Xms1024m -Xmx1024m'
networks:
pai-pai:
# kibana
kibana:
image: docker.1ms.run/kibana:7.17.4
container_name: kibana
restart: always
volumes:
- /etc/localtime:/etc/localtime
- ./components/kibana/kibana.yml:/usr/share/kibana/config/kibana.yml
ports:
- '5601:5601'
links:
- elasticsearch
depends_on:
- elasticsearch
networks:
pai-pai:
# prometheus:
prometheus:
image: prom/prometheus:v2.28.1
container_name: prometheus
environment:
TZ: Asia/Shanghai
volumes:
- ./components/prometheus/config/prometheus.yml:/etc/prometheus/prometheus.yml
- ./components/prometheus/data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
restart: always
user: root
ports:
- 9090:9090
networks:
pai-pai:
# grafana
grafana:
image: grafana/grafana
volumes:
- ./components/grafana/config/datasource.yaml:/etc/grafana/provisioning/datasource.yaml
- ./components/grafana/data:/var/lib/grafana
container_name: grafana
ports:
- "3001:3000"
- 10007:10007
depends_on:
- prometheus
privileged: true
user: root
networks:
pai-pai:
networks:
pai-pai:
driver: bridge