Standalone worker entrypoint for the distributed runner (AUTO-008).
The docker-compose.yml worker service uses the same image as web but
overrides the command to node src/worker.js. This process:
- Boots the database + AI key cache (the BullMQ job handler needs both).
- Starts the BullMQ Worker (
workers/runWorker.js) that pulls jobs from the sharedsentri:runsqueue. - Does NOT bind any HTTP port — workers are queue consumers only, so
scaling
workerreplicas with--scale worker=Ndoesn't fight over port 3001 the way running the full Express app would.
Requires REDIS_URL to be set; without Redis the BullMQ Worker is a no-op
and the container exits cleanly (so misconfiguration surfaces fast in logs
rather than silently running no jobs).