services:
  powerpanel-business:
    image: ghcr.io/nathanvaughn/powerpanel-business:local-latest
    environment:
      - TZ=Europe/Berlin
    devices:
      # sharing /dev/usb is sufficient for debian and ubuntu,
      # but other distributions might also need access to
      # /dev/bus/usb/*
      - "/dev/usb:/dev/usb"
      # - "/dev/bus/usb:/dev/bus/usb"
    restart: always
    ports:
      # Ports: ???, http, https, ???, snmp, snmp
      # See https://dl4jz3rbrsfum.cloudfront.net/documents/CyberPower_UM_PowerPanel-Business-490.pdf
      - 2003:2003
      - 3052:3052
      - 53568:53568/tcp
      - 53566:53566/udp
      - 161:161/udp
      - 162:162/udp
    volumes:
      - {{ service_directory }}/data:/data
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    networks:      
      - default

networks:
  default:
    ipam:
      driver: default
      config:
        - subnet: 172.10.0.0/16
          gateway: 172.10.0.1
