# Headscale — self-hosted Tailscale control server for LLMHosts Hive Mode (Phase 3)
#
# Usage:
#   cd infrastructure/headscale && docker compose up -d
#   docker compose exec headscale headscale users list
#   docker compose exec headscale headscale nodes list
#
# See README.md for Hive integration and ACL setup.

services:
  headscale:
    image: headscale/headscale:0.22.3
    container_name: headscale
    volumes:
      - ./config:/etc/headscale:ro
      - headscale_data:/var/lib/headscale
      - headscale_run:/var/run/headscale
    ports:
      - "8080:8080"   # Control plane (HTTP)
      - "9090:9090"   # Metrics
      - "50443:50443" # gRPC (optional, for remote CLI)
    command: headscale serve
    restart: unless-stopped

volumes:
  headscale_data:
  headscale_run:
