version: '3.8'

services:
  shadowtap:
    # Pre-built image from GitHub Container Registry (no source code needed!)
    image: ghcr.io/stuartspiegel/shadowtap:latest

    container_name: shadowtap

    # Port mapping (works on all platforms)
    ports:
      - "8080:8080"

    # Use default bridge network for cross-platform compatibility
    # Note: For Linux hosts requiring host network access, change to 'network_mode: host'
    # and remove the 'ports' section above

    cap_add:
      - NET_ADMIN
      - NET_RAW

    environment:
      - SHADOWTAP_INTERFACE=eth0
      - SHADOWTAP_PORT=8080
      - SHADOWTAP_HOST=0.0.0.0

    volumes:
      - ./data:/app/data
      - ./logs:/app/logs

    restart: unless-stopped

    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s
