53 lines
1.0 KiB
YAML
53 lines
1.0 KiB
YAML
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:
|
|
- 1883:1883
|
|
volumes:
|
|
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf
|
|
|
|
grafana:
|
|
container_name: grafana
|
|
image: grafana/grafana
|
|
ports:
|
|
- 3000:3000
|
|
volumes:
|
|
- ./data/grafana:/var/lib/grafana
|
|
|
|
mqttinflux:
|
|
image: mqttinflux
|
|
build: ./mqttinflux
|
|
environment:
|
|
TOPICS: "sensors"
|
|
MQTT_HOST: "mosquitto"
|
|
INFLUX_HOST: "influxdb"
|
|
INFLUX_DB: "test"
|
|
|