version: "3"
services:
  influxdb:
    container_name: up_influxdb
    restart: unless-stopped
    image: influxdb:1.8
    networks:
      - UnPollerBridge
    ports:
      - '8086:8086'
    volumes:
      - /portainer/Files/AppData/Config/unpoller/influx:/var/lib/influxdb
    environment:
      - INFLUXDB_DB=unifi
      - INFLUXDB_ADMIN_USER=unifi
      - INFLUXDB_ADMIN_PASSWORD=unifi

  unpoller:
    container_name: up-poller
    restart: unless-stopped
    image: golift/unifi-poller:latest
    networks:
      - UnPollerBridge
    depends_on:
      - influxdb
    volumes:
      - /portainer/Files/AppData/Config/unpoller/config:/etc/unifi-poller
      
networks:
  UnPollerBridge:
