Docker and Compose
Report container jobs and one-shot services.
One-shot containers
docker run --rm -e VIVERE_PING_URL=https://vivere.dev/p/<monitor-id> ghcr.io/example/etl \
sh -c 'curl -fsS "$VIVERE_PING_URL/start"; /app/etl; c=$?; curl -fsS "$VIVERE_PING_URL/$c"; exit $c'
Compose services that should keep running
For a long-running service, ping from a loop inside the container or from the host's cron:
services:
worker:
image: ghcr.io/example/worker
healthcheck:
test: ["CMD-SHELL", "curl -fsS -m 5 http://localhost:8080/healthz && curl -fsS -m 5 https://vivere.dev/p/<monitor-id> || exit 1"]
interval: 60s
timeout: 10s
retries: 3
Docker runs the healthcheck every minute; if the worker's own health endpoint fails, the ping is skipped and Vivere alerts after the grace period. Set the monitor period to 1m (paid plans) or 5m and grace to 5m.
Watching the host
A single cron line on the Docker host, * * * * * docker ps --format '{{.Names}}' | grep -q '^worker$' && curl -fsS https://vivere.dev/p/<monitor-id>, tells you when a container is gone entirely.