-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
105 lines (96 loc) · 2.73 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
version: '3'
services:
emqx-enterprise:
image: emqx/emqx-enterprise:5.0.4
container_name: emqx
healthcheck:
test: ["CMD", "emqx", "ping"]
interval: 10s
timeout: 10s
retries: 12
ports:
- 1883:1883
- 18083:18083
volumes:
- $PWD/emqx/cluster.hocon:/opt/emqx/data/configs/cluster.hocon
- $PWD/emqx/api_secret:/opt/emqx/data/api_secret
environment:
EMQX_DASHBOARD__BOOTSTRAP_USERS_FILE: '"/opt/emqx/data/api_secret"'
depends_on:
- kafka
emqx-exporter:
image: emqx/emqx-exporter
container_name: emqx-exporter
ports:
- 8085:8085
command:
- '--emqx.nodes=emqx-enterprise:18083'
- '--emqx.auth-username=76668f8a2003d597'
- '--emqx.auth-password=CRCDB6lxxzN58e5HoD82llBC0Erg1TVZIAUsdTjPU7N'
depends_on:
emqx-enterprise:
condition: service_healthy
mqttx-simulate:
image: emqx/mqttx-cli:v1.9.3
container_name: mqttx-simulate
command:
- /bin/sh
- -c
- |
mqttx simulate -sc tesla -c 10 -h emqx-enterprise
depends_on:
emqx-enterprise:
condition: service_healthy
mqttx:
image: emqx/mqttx-cli:v1.9.3
container_name: mqttx
command:
- /bin/sh
- -c
- |
mqttx sub -t 'mqttx/simulate/#' -v -h emqx-enterprise
depends_on:
emqx-enterprise:
condition: service_healthy
prometheus:
image: prom/prometheus
container_name: prometheus
ports:
- 9090:9090
volumes:
- $PWD/prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml
grafana:
image: grafana/grafana:9.3.2
container_name: grafana
ports:
- 3000:3000
environment:
- GF_SECURITY_ADMIN_PASSWORD=public
volumes:
- $PWD/emqx-exporter/config/grafana-template/EMQX5-enterprise:/grafana-dashboard-emqx5-ee
- $PWD/grafana-provisioning/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
- $PWD/grafana-provisioning/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
kafka:
image: wurstmeister/kafka:2.12-2.3.0
container_name: kafka
ports:
- 9092:9092
environment:
KAFKA_LISTENERS: INSIDE://0.0.0.0:9093,OUTSIDE://0.0.0.0:9092
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9093,OUTSIDE://kafka:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "my-vehicles:1:1"
depends_on:
- zookeeper
zookeeper:
image: wurstmeister/zookeeper
container_name: zookeeper
ports:
- 2181:2181
environment:
ZOOKEEPER_CLIENT_PORT: 2181
networks:
emqx-net:
name: emqx-net