# webtop -- https://docs.linuxserver.io/images/docker-webtop/
---
services:
    webtop:
        image: lscr.io/linuxserver/webtop:latest
        container_name: webtop
        environment:
            - PUID=1000
            - PGID=1000
            - TZ=America/New_York
            - TITLE=Webtop #optional
            - PIXELFLUX_WAYLAND=true
            - DRINODE=/dev/dri/renderD128
            - DRI_NODE=/dev/dri/renderD128
            - NVIDIA_VISIBLE_DEVICES=all
            - NVIDIA_DRIVER_CAPABILITIES=all
            - VK_ICD_FILENAMES=/etc/vulkan/icd.d/nvidia_icd.json
            #- DISABLE_ZINK=true
        deploy:
            resources:
                reservations:
                    devices:
                        - driver: nvidia
                          count: 1
                          capabilities: [compute, video, graphics, utility]
        # security_opt:
        #     - seccomp:unconfined
        dns:
            - ${PIHOLE_SERVER}
        shm_size: "1gb" #optional
        volumes:
            - ${WEBTOP_DATA}config:/config
        ports:
             - ${WEBTOP_HTTP_PORT}:3000
             - ${WEBTOP_HTTPS_PORT}:3001
        restart: unless-stopped
        labels:
            # Nginx Proxy Manager Automation
            - "npm.proxy.domains=webtop.wompmacho.com"
            - "npm.proxy.host=${DOCKER_HOST_IP}"
            - "npm.proxy.port=${WEBTOP_HTTPS_PORT}" 
            - "npm.proxy.scheme=https"
            - "npm.proxy.websockets=true"
            - "npm.proxy.ssl.force=true"
            - "npm.proxy.ssl.certificate.id=2"
            - "npm.proxy.accesslist.id=1"
            # Pi-hole Automation (Point to Docker Host/Proxy IP)
            - "pihole.custom-record=[[\"webtop.wompmacho.com\", \"${DOCKER_HOST_IP}\"]]"
