-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
49 lines (48 loc) · 1.09 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
version: '3.9'
services:
generators:
image: emergency-generator:latest
depends_on:
mosquitto:
condition: service_healthy
environment:
- GENERATORS=3
- BROKER=mosquitto
networks:
- mqtt
telegraf:
image: telegraf:latest
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
depends_on:
mosquitto:
condition: service_healthy
networks:
- mqtt
mosquitto:
image: eclipse-mosquitto:latest
ports:
- 1883:1883
healthcheck:
test: ["CMD", "mosquitto_pub", "-h", "localhost", "-t", "test", "-m", "hello"]
interval: 10s
retries: 5
start_period: 30s
timeout: 5s
networks:
- mqtt
volumes:
- ./mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
# Option to use InfluxDB v2 OSS
# influxdb:
# image: influxdb:latest
# volumes:
# # Mount for influxdb data directory and configuration
# - ./influxdb/data:/var/lib/influxdb2:rw
# ports:
# - 8086:8086
# networks:
# - mqtt
networks:
mqtt:
name: mqtt