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 port8000, and the host is accessible using the IP192.168.1.110, the base URL should behttp://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.
- an RTSP stream URL (must start with
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 behttps://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 vehiclesoverhead: optimized for a fixed camera above the roadparking: optimized for a slow-moving camera that captures parking vehiclesin_motion: optimized for a moving cameraside_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 algorithmHS384: HMAC using SHA-384 hash algorithmHS512: HMAC using SHA-512 hash algorithm
- Asymmetric:
RS256: RSASSA using SHA-256 hash algorithmRS384: RSASSA using SHA-384 hash algorithmRS512: RSASSA using SHA-512 hash algorithmPS256: RSASSA-PSS using SHA-256 hash algorithmPS384: RSASSA-PSS using SHA-384 hash algorithmPS512: RSASSA-PSS using SHA-512 hash algorithmES256: ECDSA using P-256 curve and SHA-256 hash algorithmES384: ECDSA using P-384 curve and SHA-384 hash algorithmES512: ECDSA using P-521 curve and SHA-512 hash algorithm
- Symmetric:
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.