services:
  edge-proxy:
    build:
      context: .
      dockerfile: Dockerfile
      # If Xavier already has ros2stack image locally, you can uncomment:
      # args:
      #   BASE_IMAGE: ros2stack-nav-robot:25.10.03-v1-0
    network_mode: host
    restart: unless-stopped
    environment:
      # DDS must match Ghost/Xavier domain.
      ROS_DOMAIN_ID: "123"
      RMW_IMPLEMENTATION: rmw_cyclonedds_cpp
      # If you want a deterministic CycloneDDS config, mount one and set this:
      # CYCLONEDDS_URI: /data/cyclonedds.xml

      EDGE_PROXY_BACKEND: rosbridge
      EDGE_PROXY_WS_HOST: 0.0.0.0
      EDGE_PROXY_WS_PORT: "8080"
      EDGE_PROXY_WS_PATH: /edge
      EDGE_PROXY_WAYPOINTS_PATH: /data/waypoints.yaml
      EDGE_PROXY_ROSBRIDGE_URL: wss://127.0.0.1:9090
      EDGE_PROXY_ROSBRIDGE_INSECURE_TLS: "true"

    volumes:
      - ./config/waypoints.yaml:/data/waypoints.yaml:ro
      # Optional CycloneDDS config override:
      # - ./config/cyclonedds.xml:/data/cyclonedds.xml:ro
