# /opt/stacks/headscale/docker-compose.yml services: headscale: container_name: headscale image: headscale/headscale:latest restart: unless-stopped command: serve ports: - "8080:8080" # API i clients (només local → via Nginx) - "9090:9090" # Mètriques Prometheus (mai públic) volumes: - headscale_config:/etc/headscale # Configuració persistent - headscale_data:/var/lib/headscale # Dades persistents - headscale_socket:/var/run/headscale # Socket Unix per a la UI environment: TZ: Europe/Madrid networks: - headscale-net - shared_net headscale-ui: container_name: headscale-ui image: ghcr.io/gurucomputing/headscale-ui:latest restart: unless-stopped ports: - "8081:80" # Interfície web (només local → via Nginx) volumes: - headscale_socket:/var/run/headscale # Socket Unix compartit amb headscale environment: TZ: Europe/Madrid depends_on: - headscale networks: - headscale-net - shared_net volumes: headscale_config: headscale_data: headscale_socket: networks: headscale-net: driver: bridge shared_net: external: true name: shared_net