services:
  leader:
    image: lerkolabs/uptop:latest
    sysctls:
      - net.ipv4.ping_group_range=0 2147483647
    environment:
      - UPTOP_CLUSTER_MODE=leader
      - UPTOP_CLUSTER_SECRET=changeme  # EXAMPLE ONLY — rotate before use
      - UPTOP_AGG_STRATEGY=any-down
      - UPTOP_STATUS_ENABLED=true
    ports:
      - "8080:8080"
      - "23234:23234"

  probe-us-east:
    image: lerkolabs/uptop:latest
    healthcheck:
      disable: true
    environment:
      - UPTOP_CLUSTER_MODE=probe
      - UPTOP_NODE_ID=us-east-1
      - UPTOP_NODE_NAME=US East Probe
      - UPTOP_NODE_REGION=us-east
      - UPTOP_PEER_URL=http://leader:8080
      - UPTOP_CLUSTER_SECRET=changeme  # EXAMPLE ONLY — rotate before use
    depends_on:
      - leader

  probe-eu-west:
    image: lerkolabs/uptop:latest
    healthcheck:
      disable: true
    environment:
      - UPTOP_CLUSTER_MODE=probe
      - UPTOP_NODE_ID=eu-west-1
      - UPTOP_NODE_NAME=EU West Probe
      - UPTOP_NODE_REGION=eu-west
      - UPTOP_PEER_URL=http://leader:8080
      - UPTOP_CLUSTER_SECRET=changeme  # EXAMPLE ONLY — rotate before use
    depends_on:
      - leader
