# Example deployment pulling the prebuilt image from GHCR.
#   docker compose up -d   →   open http://127.0.0.1:8080
services:
  dockdoe:
    image: ghcr.io/sniner/dockdoe:latest
    container_name: dockdoe
    restart: unless-stopped
    ports:
      # Host-only by default; change to "8080:8080" to expose on the network.
      - "127.0.0.1:8080:8080"
    volumes:
      # The Docker socket: required for monitoring AND for the start/stop/
      # restart actions. This grants full control of the Docker daemon
      # (effectively root on the host) — only run images you trust.
      - /var/run/docker.sock:/var/run/docker.sock
      # Persists the metrics database across restarts/upgrades.
      - dockdoe-data:/data
      # To show stacks' compose.yml in the UI, DockDoe reads the file from the
      # absolute host path Docker records (com.docker.compose.project.config_
      # files). Mount the directory that holds your compose projects at the
      # SAME path inside the container (read-only) so that path resolves.
      # Example, if your stacks live under /opt/stacks:
      # - /opt/stacks:/opt/stacks:ro
    # Host CPU/load/memory in the header already reflect the real host: the
    # /proc files DockDoe reads are not namespaced. No /proc mount needed.
    # environment:
    #   # Recommended when exposing the UI beyond localhost: reject requests
    #   # whose Host header isn't listed here (DNS-rebinding guard).
    #   # localhost/127.0.0.1/::1 always work.
    #   DOCKDOE_ALLOWED_HOSTS: dockhost.lan
    #   # Where the port pills link. Unset = the host you browse DockDoe at
    #   # (right when that IS the Docker host). Behind a reverse proxy the
    #   # browsing host is the proxy, where the container ports aren't open —
    #   # set the Docker host's real address so the links still work, or "off"
    #   # to render ports as plain pills with no links.
    #   DOCKDOE_PORT_HOST: 192.168.1.50
    #   # Notify on container state changes via an Apprise endpoint. The target
    #   # services (Discord, e-mail, …) are configured in Apprise; DockDoe just
    #   # POSTs here. Unset = notifications off.
    #   DOCKDOE_APPRISE_URL: https://apprise.example/notify/your-key

volumes:
  dockdoe-data:
