Healthchecks receives HTTP requests or email “pings” from cron jobs and alerts when a ping is late. Tutorial 0813 runs Healthchecks with PostgreSQL in Docker, then creates an administrator account on port 8000.[12]

The original i12bretro video remains on YouTube.[17]
1. Install Docker
- Log into the Linux device.[12]
- Run:[12]
| |
Reauthenticate after the Docker group change and check the daemon.[12]
2. Create directories, the network, and .env
- Create the working directories and Docker network, download the base configuration, and generate a 32-character random string with these commands.[12]
| |
The postresql path is kept exactly as written in the tutorial. I can choose another spelling locally, but then I change the later volume path consistently.[12]
- Scroll through
.envand update at least these keys.[12]
In .env, scroll through the file and enter your own database, email, and secret-key values:[12]
| |
ALLOWED_HOSTS=* is the value shown by the source; for a real deployment I consider a specific hostname. SECRET_KEY must be a separate random string and DB_PASSWORD must match the PostgreSQL password.[12]
- Press
CTRL+Wand search forlocalhost.[12] - Replace every
localhostreference with the Docker host's DNS name or IP, for example setSITE_ROOT=http://ubuntuser.local:8000orSITE_ROOT=http://ubuntuserver.local:8000instead ofSITE_ROOT=http://localhost:8000.[12] - Press
CTRL+O, Enter,CTRL+Xto save.env.[12]
3. Run PostgreSQL and Healthchecks
- After editing
.env, run the commands that create PostgreSQL, Healthchecks, and the administrator.[12]
| |
The PostgreSQL password in the command must match DB_PASSWORD in .env; create a unique password and enter the same value in both places. Enter the admin email and password interactively in createsuperuser.[12]
4. Log in and create a ping
- Open
http://DNSorIP:8000.[12] - Log in with the administrator account created above.[12]
- Confirm the Healthchecks dashboard.[12]
- Create a check for a cron job and use the ping URL supplied by the dashboard in the real job.[12]
Checks and limits
I inspect docker ps, docker logs postgres, docker logs healthchecks, the database volume, and the containers network. If I change SITE_ROOT, email, or the database password, I restart the container and read its logs rather than guessing. I do not expose PostgreSQL on WAN; the source describes 2FA/WebAuthn and team features, but protecting the dashboard remains a deployment responsibility.[12]
Original tutorial video: [watch it on YouTube]1.[17]
Source
Original source: [Running Healthchecks - A Cron Job Monitoring Service - In Docker]2, published/updated 2024-07-28.[12]
Sources
[12] https://i12bretro.github.io/tutorials/0813.html — Running Healthchecks in Docker [17] https://www.youtube.com/watch?v=4l57CgiHKRI — Running Healthchecks — A Cron Job Monitoring Service — In Docker — i12bretro video
https://www.youtube.com/watch?v=4l57CgiHKRI — official i12bretro video. ↩︎
https://i12bretro.github.io/tutorials/0813.html — Running Healthchecks - A Cron Job Monitoring Service - In Docker. ↩︎


Góp Ý / Bình Luận / Đánh giá