Automated health monitoring for the news-platform services on CT222, motivated by the bridge crash-loop incident (BIT-743) where 3,608 restarts went undetected until manual discovery. Health endpoints: - Bridge /health enhanced with optional ?checks=true for deep dependency probes (WordPress, Redis) and uptime reporting - Frontend /health.json added as Astro API route Monitoring infrastructure: - healthcheck.sh: periodic probe script with HTTP checks, systemd restart-count detection, cooldown logic, and Ntfy push alerting - news-healthcheck.timer: runs every 3 min (detection < 5 min) - [email protected]: OnFailure template for instant crash alerts - All three service units updated with OnFailure= directive - deploy.sh updated to install monitoring units and env file Paperclip-Agent: peter-spark Paperclip-Issue: BIT-744 Paperclip-Run: 405ab587-8b8b-4963-8867-0feb95a994e3
19 lines
445 B
Desktop File
19 lines
445 B
Desktop File
[Unit]
|
|
Description=News Platform — WordPress Docker Compose Stack
|
|
After=docker.service
|
|
Requires=docker.service
|
|
OnFailure=news-alert@%N.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
WorkingDirectory=/opt/news-platform/wordpress
|
|
ExecStart=/usr/bin/docker compose up -d --remove-orphans
|
|
ExecStop=/usr/bin/docker compose down
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=news-wordpress
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|