2021-02-17 08:11:58 +00:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
# # Define a Telegraf service
|
|
|
|
# telegraf:
|
|
|
|
# image: telegraf:1.4.0
|
|
|
|
# volumes:
|
|
|
|
# - ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
|
|
|
|
# ports:
|
|
|
|
# - "8092:8092/udp"
|
|
|
|
# - "8094:8094"
|
|
|
|
# - "8125:8125/udp"
|
|
|
|
# links:
|
|
|
|
# - mosquitto
|
|
|
|
|
|
|
|
# Define an InfluxDB service
|
|
|
|
influxdb:
|
|
|
|
container_name: influxdb
|
|
|
|
image: influxdb
|
|
|
|
volumes:
|
|
|
|
- ./data/influxdb:/var/lib/influxdb
|
|
|
|
ports:
|
|
|
|
- "8086:8086"
|
|
|
|
environment:
|
|
|
|
- INFLUXDB_INIT_PWD="password"
|
|
|
|
- PRE_CREATE_DB="iot"
|
|
|
|
|
|
|
|
mosquitto:
|
|
|
|
container_name: mosquitto
|
|
|
|
image: eclipse-mosquitto
|
|
|
|
ports:
|
2021-02-19 11:06:59 +00:00
|
|
|
- 1883:1883
|
2021-03-28 09:03:30 +00:00
|
|
|
volumes:
|
|
|
|
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf
|
2021-02-17 08:11:58 +00:00
|
|
|
|
|
|
|
grafana:
|
|
|
|
container_name: grafana
|
|
|
|
image: grafana/grafana
|
|
|
|
ports:
|
|
|
|
- 3000:3000
|
2021-02-19 11:06:59 +00:00
|
|
|
volumes:
|
|
|
|
- ./data/grafana:/var/lib/grafana
|
|
|
|
|
|
|
|
mqttinflux:
|
|
|
|
image: mqttinflux
|
|
|
|
build: ./mqttinflux
|
|
|
|
environment:
|
|
|
|
TOPICS: "sensors"
|
|
|
|
MQTT_HOST: "mosquitto"
|
|
|
|
INFLUX_HOST: "influxdb"
|
|
|
|
INFLUX_DB: "test"
|
|
|
|
|