Docker Deployment
TaskDaemon launches handler containers through an existing Docker engine. Checkdocker info, build or pull configured handler images, then start the daemon.
Docker Run
Port 8080 serves HTTP, metrics, and health; 50051 serves plaintext gRPC. A process with access to the Docker socket can control that engine, so restrict access to the daemon container and its APIs.
Docker Compose
docker compose down retains named volumes. docker compose down -v deletes them and the task history.
Build Handler Images First
docker compose build for the handler services before starting TaskDaemon. depends_on alone does not establish handler readiness or guarantee that an image is built. TaskDaemon creates its own persistent handler containers from the configured images.
Startup Checks
The supplied daemon image includes curl. This health check inspects the JSON status because/health currently returns HTTP 200 even for an unhealthy response:
/health checks the daemon and reads the exact Pending count from storage. Handler initialization has no readiness handshake. Submit a smoke task for every handler and wait for completed before sending production traffic. First-task latency can include runtime or model initialization.
Monitoring
Use the same taskdaemon service and named volume above. Add these services and the Prometheus configuration:docker compose --profile monitoring up -d. Configure Grafana to use http://prometheus:9090.
Recovery and Timeouts
Both SQLite and Hybrid persist claims, results, retry policy, and retry visibility. Hybrid caches task lookups while SQLite remains authoritative for queue operations. A healthy worker renews all its outstanding claims every 30 seconds, including tasks waiting in a batch. A Processing task whose lease is over five minutes old becomes eligible for recovery. Graceful shutdown releases unexecuted claims without spending retries. Recovery provides at-least-once execution: use idempotent handlers or deduplicate external effects bytask_id. See environment configuration for retry and timeout behavior.