#!/bin/bash # Docker HEALTHCHECK — passes only if both fail2ban and dashboard are responding. set -e # Check fail2ban daemon is alive fail2ban-client ping > /dev/null 2>&1 || exit 1 # Check dashboard HTTP endpoint is responding curl -sf --max-time 5 "http://localhost:${PORT:-4000}/api/bans" > /dev/null 2>&1 || exit 1 exit 0