fueanta

Docker composer to install heartbeat for healthchecks.io

Jul 19th, 2026
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.52 KB | None | 0 0
  1. services:
  2.   heartbeat:
  3.     image: curlimages/curl:latest
  4.     container_name: heartbeat
  5.     entrypoint: ["/bin/sh", "-c"]
  6.     command:
  7.      - |
  8.        while true; do
  9.           curl --fail --silent --show-error \
  10.             --max-time 10 --retry 2 \
  11.             "$${PING_URL}" || true
  12.           sleep 60
  13.         done
  14.     environment:
  15.       PING_URL: "${HEARTBEAT_URL}"
  16.     restart: unless-stopped
  17.     init: true
  18.     read_only: true
  19.     cap_drop:
  20.      - ALL
  21.     security_opt:
  22.      - no-new-privileges:true
Advertisement
Add Comment
Please, Sign In to add comment