Docker
Build and run the worker as a container.
The repository ships docker/worker.Dockerfile. Settings come from the environment only; no key is
ever baked into the image.
git clone https://github.com/soumyacodes007/arkiv-triggers
cd arkiv-triggers
docker build -f docker/worker.Dockerfile -t arkiv-triggers-worker .
docker run --env-file .env -p 8080:8080 arkiv-triggers-workerThe image:
- builds the package, then copies only the built code and runtime dependencies into a
node:22-alpineimage; - runs as the unprivileged
nodeuser; - sets
PORT=8080and aHEALTHCHECKon/healthz, sodocker psshowshealthy; - handles
SIGTERMfrom the start (as PID 1 it would otherwise ignore it), finishing actions in flight.
docker ps --format '{{.Names}} {{.Status}}'
curl localhost:8080/healthzUse a real .env file only on the machine that runs the container, and never commit it.