worker
A container that keeps running without answering requests.
A container that runs continuously without answering requests — a queue consumer, a scheduler, a bot. Ackee keeps the number of copies you ask for running, and replaces any that stop.
ackee.ack
ackee 1project "shop" {cloud = "aws"region = "us-east-1"}worker "mailer" {image = "public.ecr.aws/docker/library/node:22-alpine"command = ["node", "mailer.js"]size = "small"count = 2env = {LOG_LEVEL = "info"}}queue "emails" {}connect env "mailer" -> "emails"connect iam "mailer" -> "emails"
Fields
| Field | Takes | Meaning |
|---|---|---|
| imagerequired | string | var.NAME | The container image to run. |
| size | "small" | "medium" | "large" default "small" | CPU and memory per copy, on the same ladder as service. Must be written out, not referenced. |
| count | whole number default 1 | How many copies to keep running. 0 stops it without removing it. |
| command | list of strings | The command to run in place of the image's default one; the image's entrypoint still runs first, as with docker run image node mailer.js. Leave it out to run the image as built. |
| env | map | Environment variables, as for service. |
| build | map | Build and redeploy from a repository on every push — see source. |
Any other field is refused (AK204), and the error names the exact type to declare with node for the setting you wanted.
What it becomes
| Cloud | Becomes |
|---|---|
| AWS | An ECS service on Fargate with no load balancer and no open port. |
| Google Cloud | A Cloud Run worker pool. |
| Azure | A Container App with no ingress. |
Joins the shared network net: all three clouds.
Notes
commandis what Docker calls the command and AWS callscommand; Cloud Run and Container Apps call itargs, and use their owncommandfor the entrypoint. The portable field means the same thing on all three.