services:
  sfu:
    image: rg.fr-par.scw.cloud/sfu-server/sfu:latest
    restart: always
    network_mode: host  # IMPORTANT: nécessaire pour WebRTC UDP
    environment:
      # Configuration de base
      - SERVER_PORT=8080
      - SFU_MODE=hybrid
      - SFU_ID=${SFU_ID:-sfu-1}
      
      # URLs - À CONFIGURER
      - SERVER_URL=${SERVER_URL:-https://b11f5934-2ffd-4d80-afdb-6dfba563922b.pub.instances.scw.cloud}
      - CONTROL_PLANE_URL=${CONTROL_PLANE_URL:-https://519ddacd-6411-4de9-886a-a2976087ac84.pub.instances.scw.cloud}
      
      # Configuration STUN uniquement (serveurs Google gratuits)
      - STUN_SERVERS=stun:stun.l.google.com:19302,stun:stun1.l.google.com:19302,stun:stun2.l.google.com:19302
      
    healthcheck:
      test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/health"]
      interval: 30s
      timeout: 10s
      retries: 3
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"
