version: '3.5'
services:
  influxdb:
    image: influxdb:latest
    container_name: influxdb
    restart: unless-stopped
    ports:
      - "28083:8083"
      - "28086:8086"
      - "28090:8090"
    environment:
      - INFLUXDB_DATA_ENGINE=tsm1
      - INFLUXDB_REPORTING_DISABLED=true
      - INFLUXDB_ADMIN_USER=junv
      - INFLUXDB_ADMIN_PASSWORD=@wahyd4
      - INFLUXDB_HTTP_AUTH_ENABLED=true
      - INFLUXDB_DB=home
    volumes:
      # Data persistency
      # sudo mkdir -p /srv/docker/influxdb/data
      - /mnt/influxdb:/var/lib/influxdb
  telegraf:
    image: telegraf:latest
    container_name: telegraf
    restart: unless-stopped
    links:
      - influxdb
    volumes:
      - ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
