Docker image that periodically calls a monitoring URL via HTTP GET.
Intended for use in multi-container Docker Compose projects as basic monitoring for the overall project: add the pinghc service to an existing compose.yml alongside your other services — as long as the entire stack is running, the ping is sent and the monitoring service reports the project as healthy.
Source repository: Codeberg: thoschworks/dockerpinghc
cp sample.env .env
Edit .env and set your values:
PINGHC_URL=https://hc-ping.com/your-uuid-here
PINGHC_INTERVAL=60 # seconds
Start the container:
docker compose up -d
View logs:
docker compose logs -f
| Variable | Required | Default | Description |
|---|---|---|---|
PINGHC_URL | yes | — | URL to call on each ping. Set to no to disable monitoring (container runs idle). |
PINGHC_INTERVAL | no | 60 | Interval between pings in seconds |
The recommended way to add dockerpinghc to an existing Docker Compose project is via the pre-built image on Docker Hub. Images are available for AMD64 and ARM64.
compose.ymlservices:
# ... your existing services ...
pinghc:
image: thoschworks/dockerpinghc:latest
restart: unless-stopped
environment:
PINGHC_URL: ${PINGHC_URL}
PINGHC_INTERVAL: ${PINGHC_INTERVAL}
Add to your parent project's .env:
PINGHC_URL=https://hc-ping.com/your-uuid-here
PINGHC_INTERVAL=60 # seconds
If you prefer to build the image locally or pin to a specific commit, you can add dockerpinghc as a Git submodule instead.
git submodule add <repo-url> pinghc
Reference the local build in your compose.yml:
pinghc:
build: ./pinghc/build
restart: unless-stopped
environment:
PINGHC_URL: ${PINGHC_URL}
PINGHC_INTERVAL: ${PINGHC_INTERVAL}
Cloning a project that uses this submodule:
git clone --recurse-submodules <parent-project-url>
Or, if already cloned:
git submodule update --init
Updating the submodule:
git submodule update --remote pinghc
git add pinghc
git commit -m "Update pinghc submodule"
The image is built automatically by Docker Compose from the build/ directory:
docker compose build
Versions are derived from Git tags using git describe. To build a versioned image manually:
git tag v1.2.3
docker build -t dockerpinghc:v1.2.3 ./build
This project is created, maintained, and documented with the assistance of Claude Code.
Content type
Image
Digest
sha256:c2c7859ae…
Size
3.7 MB
Last updated
16 days ago
docker pull thoschworks/dockerpinghc