Configuration

You can configure the image using environment variables.

  • FRONTEND_API_BASE_URL (required): The base URL where the browser-based front end can access the API. For example if you bind the container to port 8000, and the host is accessible using the IP 192.168.1.110, the base URL should be http://192.168.1.110:8000/api.
  • AGENT_SOURCE (required): The video/image source the agent consumes. This can be:
    • an RTSP stream URL (must start with rtsp://)
    • an RTMP stream URL (must start with rtmp://)
    • an MJPEG stream URL (must start with mjpeg://)
    • an MP4 video file path (must end with .mp4). To allow the agent to access the file, you should attach its parent directory as a volume.
  • AGENT_API_KEY (required): The API key to use when calling the cloud API.
  • AGENT_API_URL (required): The URL to use when calling the cloud API. In most cases, this should be https://api.carmencloud.com/vehicle.
  • AGENT_LOCATION (required): 3-letter code of the country where the input stream was / is being recorded. See the up-to-date list of possible values here.
  • AGENT_USECASE (optional): Determines which vehicle detection engine will be used.
    • general (default): a balanced engine trained to recognize most vehicles
    • overhead: optimized for a fixed camera above the road
    • parking: optimized for a slow-moving camera that captures parking vehicles
    • in_motion: optimized for a moving camera
    • side_fixed: optimized for a fixed camera at the side of the road
  • API_WEBHOOK_URL (optional): An HTTP POST endpoint where the agent forwards all recognition events. The structure of these POST requests is documented in under Webhook Request Structure heading in this document.
  • API_SIGNATURE_ALG (optional): The algorithm to be used when signing webhook requests:
    • Symmetric:
      • HS256: HMAC using SHA-256 hash algorithm
      • HS384: HMAC using SHA-384 hash algorithm
      • HS512: HMAC using SHA-512 hash algorithm
    • Asymmetric:
      • RS256: RSASSA using SHA-256 hash algorithm
      • RS384: RSASSA using SHA-384 hash algorithm
      • RS512: RSASSA using SHA-512 hash algorithm
      • PS256: RSASSA-PSS using SHA-256 hash algorithm
      • PS384: RSASSA-PSS using SHA-384 hash algorithm
      • PS512: RSASSA-PSS using SHA-512 hash algorithm
      • ES256: ECDSA using P-256 curve and SHA-256 hash algorithm
      • ES384: ECDSA using P-384 curve and SHA-384 hash algorithm
      • ES512: ECDSA using P-521 curve and SHA-512 hash algorithm
  • API_SIGNATURE_SECRET (required if using a symmetric signature algoritm): the shared secret to be used when signing webhook requests.
  • API_SIGNATURE_PRIVATE_KEY_PATH (required if using an asymmetric algorithm): the path inside the container to the PEM-encoded private key to be used when signing webhook requests.