-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
97 lines (90 loc) · 2.52 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
version: '3.8'
services:
emqx-enterprise:
image: emqx/emqx-enterprise:5.0.3
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"'
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 IEM -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
timescaledb:
image: timescale/timescaledb:latest-pg12
container_name: timescaledb
ports:
- 5432:5432
volumes:
- $PWD/create-table.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=public
- POSTGRES_DB=iot_data
prometheus:
image: prom/prometheus:v2.44.0
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-dashboards:/grafana-dashboard-IEM
- $PWD/grafana-provisioning/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
- $PWD/grafana-provisioning/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
depends_on:
emqx-enterprise:
condition: service_healthy
timescaledb:
condition: service_started
networks:
emqx-net:
name: emqx-net