-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
61 lines (60 loc) · 1.86 KB
/
docker-compose.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
version: '3.0'
services:
mysql8:
image: mysql:8.0.29
restart: always
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
# 设置初始化脚本
- ./script/mysql/:/docker-entrypoint-initdb.d/
ports:
# 注意这里我映射为了 13306 端口
- "13306:3306"
redis:
image: 'bitnami/redis:latest'
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- '16379:6379'
mongo:
image: mongo:6.0
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
ports:
- 27017:27017
kafka:
image: 'bitnami/kafka:3.6.0'
ports:
- '9092:9092'
- '9094:9094'
environment:
- KAFKA_CFG_NODE_ID=0
# - 允许自动创建 topic,线上不要开启
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
- KAFKA_CFG_PROCESS_ROLES=controller,broker
- KAFKA_CFG_LISTENERS=PLAINTEXT://0.0.0.0:9092,CONTROLLER://:9093,EXTERNAL://0.0.0.0:9094
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka:9093
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
prometheus:
image: prom/prometheus:v2.47.2
volumes:
# - 将本地的 prometheus 文件映射到容器内的配置文件
- ./prometheus.yaml:/etc/prometheus/prometheus.yml
ports:
# - 访问数据的端口
- 9090:9090
# grafana:
# image: grafana/grafana-enterprise:10.2.0
# ports:
# - 3000:3000
# zipkin:
# # 用的是不支持 Kafka 之类的简化版本
# image: openzipkin/zipkin-slim:2.24
# ports:
# - '9411:9411'