-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yaml
78 lines (73 loc) · 2.05 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
version: "3.9"
services:
influxdb:
image: influxdb:2.7-alpine
container_name: influxdb
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=${INFLUX_USER_NAME}
- DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUX_USER_PASSWORD}
- DOCKER_INFLUXDB_INIT_ORG=${GRAFANA_ORG_NAME}
- DOCKER_INFLUXDB_INIT_BUCKET=${INFLUX_BUCKET}
volumes:
- ./influxdb/data:/var/lib/influxdb2
- ./influxdb/config:/etc/influxdb2
- ./influxdb/setup:/setup
ports:
- 8086:8086
restart: unless-stopped
networks:
- mtig_network
mosquitto:
image: eclipse-mosquitto:2
container_name: mosquitto
volumes:
- ./mosquitto/config/mosquitto.conf:/mosquitto/config/mosquitto.conf
- ./mosquitto/config/password.txt:/mosquitto/conf/password.txt
- ./mosquitto/log:/mosquitto/log
- ./mosquitto/data:/mosquitto/data
- ./mosquitto/certs:/mosquitto/certs
restart: unless-stopped
environment:
MQTT_USER: ${MQTT_USER}
MQTT_PW: ${MQTT_PW}
ports:
- 1883:1883
- 8883:8883
networks:
- mtig_network
telegraf:
image: telegraf:1.26-alpine
container_name: telegraf
user: telegraf
environment:
MQTT_USER: ${MQTT_USER}
MQTT_PW: ${MQTT_PW}
GRAFANA_ORG_NAME: ${GRAFANA_ORG_NAME}
INFLUX_BUCKET: ${INFLUX_BUCKET}
INFLUX_TOKEN: ${INFLUX_TOKEN}
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf
restart: unless-stopped
depends_on:
mosquitto:
condition: service_started
networks:
- mtig_network
grafana:
image: grafana/grafana:9.5.2
container_name: grafana
ports:
- 3000:3000
environment:
GF_SECURITY_ADMIN_USER: ${GRAFANA_ADMIN_USER}
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PW}
volumes:
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- ./grafana/var/lib:/var/lib/grafana
restart: unless-stopped
networks:
- mtig_network
networks:
mtig_network:
driver: bridge