services:
    powerpanel-business:
      image: ghcr.io/nathanvaughn/powerpanel-business:local-490
      environment:
        - TZ=Europe/Berlin
        - ENABLE_LOGGING=true
      privileged: true
      devices:
         - /dev/bus/usb:/dev/bus/usb
         - /dev/bus/usb/001/007:/dev/bus/usb/001/007
      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:
        - /opt/powerpanel-personal/data:/data
        - /etc/localtime:/etc/localtime:ro
        - /etc/timezone:/etc/timezone:ro
      networks:
        - default
  
    nut-upsd:
      image: instantlinux/nut-upsd:latest
      container_name: nut-upsd
      environment:
        - DRIVER=usbhid-ups
        - NAME=ups
        - API_PASSWORD=8w76C$rCf2kZ83yZW3Cri7
      devices:
        - /dev/bus/usb:/dev/bus/usb
        - /dev/bus/usb/001/007:/dev/bus/usb/001/007
      ports:
        - "3493:3493"
     restart: always
      networks:
        - default
  
  networks:
    default:
      ipam:
        driver: default
        config:
          - subnet: 172.10.0.0/16
            gateway: 172.10.0.1
