services:
  telegraf:
    container_name: telegraf
    image: telegraf:1.36.2
    restart: unless-stopped
    environment:
      - TELEGRAF_DEBUG=true
      - MQTT_USER=${TELEGRAF_MQTT_USER}
      - MQTT_PASS=${TELEGRAF_MQTT_PASS}
      - DATABASE_HOST=${TELEGRAF_DATABASE_HOST}
      - DATABASE_PORT=${TELEGRAF_DATABASE_PORT}
      - DATABASE_USER=${TELEGRAF_DATABASE_USER}
      - DATABASE_PASS=${TELEGRAF_DATABASE_PASS}
      - DATABASE_NAME=${TELEGRAF_DATABASE_NAME}
    extra_hosts:
    - host:192.168.2.200
    volumes:
      - /opt/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
