version: "3.9"
x-common-variables: &common-variables
  # Add variables here to add them to all agents
  AGENT_HUB_KEY: "xxxxx" # The access key linked to your account in Kerberos Hub.
  AGENT_HUB_PRIVATE_KEY: "xxxxx" # The secret access key linked to your account in Kerberos Hub.
  # find full list of environment variables here: https://github.com/kerberos-io/agent#override-with-environment-variables
services:
  kerberos-agent1:
    image: "kerberos/agent:latest"
    ports:
      - "8081:80"
    environment:
      <<: *common-variables
      AGENT_NAME: agent1
      AGENT_CAPTURE_IPCAMERA_RTSP: rtsp://username:password@x.x.x.x/Streaming/Channels/101 # Hikvision camera RTSP url example
      AGENT_KEY: "1"
  kerberos-agent2:
    image: "kerberos/agent:latest"
    ports:
      - "8082:80"
    environment:
      <<: *common-variables
      AGENT_NAME: agent2
      AGENT_CAPTURE_IPCAMERA_RTSP: rtsp://username:password@x.x.x.x/channel1 # Linksys camera RTSP url example
      AGENT_KEY: "2"
  kerberos-agent3:
    image: "kerberos/agent:latest"
    ports:
      - "8083:80"
    environment:
      <<: *common-variables
      AGENT_NAME: agent3
      AGENT_CAPTURE_IPCAMERA_RTSP: rtsp://username:password@x.x.x.x/cam/realmonitor?channel=1&subtype=1 # Dahua camera RTSP url example
      AGENT_KEY: "3"
networks:
  default:
    name: cluster-net
    external: true
