# Dockge — per-host Docker Compose UI (https://dockge.kuma.pet/).
#
# One instance runs on every Docker host so the compose dir is manageable
# from a browser. Each host sets DOCKGE_HOST_LABEL + DOCKGE_HOST_IP in its
# .env so the homepage card points at the right place.
#
# All tunables live in .env — edit that, not this file.

services:
  dockge:
    image: louislam/dockge:${DOCKGE_VERSION:-latest}
    container_name: dockge
    restart: unless-stopped
    ports:
      - "${DOCKGE_PORT:-5001}:5001"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - dockge_data:/app/data
      # Bind-mount the host's stacks root at the same path inside the
      # container. Default /opt/docker matches the fleet convention;
      # corviduo-dev overrides to /home/vh/docker because PFI's standard
      # /opt/docker path is sudo-gated by deploy:deploy there and vh
      # lacks passwordless sudo. See servers/corviduo-dev/README.md.
      - ${DOCKGE_HOST_STACKS_ROOT:-/opt/docker}:${DOCKGE_HOST_STACKS_ROOT:-/opt/docker}
    environment:
      - DOCKGE_STACKS_DIR=${DOCKGE_HOST_STACKS_ROOT:-/opt/docker}/compose
    networks:
      - tnet
    labels:
      - homepage.group=Compose Consoles
      - homepage.name=Dockge (${DOCKGE_HOST_LABEL})
      - homepage.icon=sh-dockge.png
      - homepage.description=Compose UI on ${DOCKGE_HOST_LABEL}
      - homepage.href=http://${DOCKGE_HOST_IP}:${DOCKGE_PORT:-5001}

volumes:
  dockge_data:

networks:
  tnet:
    name: traefik-net
    external: true
