-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
84 lines (79 loc) · 2.12 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
services:
mqtt:
image: eclipse-mosquitto:latest
container_name: mqtt-broker
ports:
- "1883:1883"
- "9001:9001"
volumes:
- ./mosquitto_config:/mosquitto/config
networks:
- monitoring_net
influxdb:
image: influxdb:2
container_name: influxdb
environment:
DOCKER_INFLUXDB_INIT_MODE: setup
DOCKER_INFLUXDB_INIT_USERNAME_FILE: /run/secrets/influxdb2-admin-username
DOCKER_INFLUXDB_INIT_PASSWORD_FILE: /run/secrets/influxdb2-admin-password
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN_FILE: /run/secrets/influxdb2-admin-token
DOCKER_INFLUXDB_INIT_ORG: zeroth-robotics
DOCKER_INFLUXDB_INIT_BUCKET: robot
secrets:
- influxdb2-admin-username
- influxdb2-admin-password
- influxdb2-admin-token
ports:
- "8086:8086"
volumes:
- ./influxdb/data:/var/lib/influxdb2
- ./influxdb/config:/etc/influxdb2
networks:
- monitoring_net
healthcheck:
test: ["CMD", "influx", "ping"]
interval: 5s
timeout: 3s
retries: 5
grafana:
image: grafana/grafana:latest
container_name: grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_INSTALL_PLUGINS=grafana-mqtt-datasource
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning
- ./grafana/dashboards:/var/lib/grafana/dashboards
ports:
- "3000:3000"
networks:
- monitoring_net
depends_on:
- influxdb
telegraf:
image: telegraf:latest
container_name: telegraf
environment:
- INFLUXDB_TOKEN=${INFLUXDB_TOKEN}
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
secrets:
- influxdb2-admin-token
networks:
- monitoring_net
depends_on:
mqtt:
condition: service_started
influxdb:
condition: service_healthy
networks:
monitoring_net:
driver: bridge
secrets:
influxdb2-admin-username:
file: .env.influxdb2-admin-username
influxdb2-admin-password:
file: .env.influxdb2-admin-password
influxdb2-admin-token:
file: .env.influxdb2-admin-token