Keep /alive unchanged and serve a dashboard at / with status cards, latency graphs, an event timeline, and a Wi-Fi section. Background monitors on configurable intervals: TCP reachability, DNS resolution, public IP change detection, host reboot detection, Wi-Fi link quality, and Wi-Fi scan of networks in range via iw. The Wi-Fi interface is selected with WIFI_INTERFACE; the page lists visible interfaces and reports when none is available. Scan results stay in memory, other metrics go to SQLite on a mounted volume. Optional MQTT publishing with Home Assistant discovery groups all sensors under one device per host. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TdvJYoY8kc8bmBck89U2i6
24 lines
622 B
YAML
24 lines
622 B
YAML
services:
|
|
healthcheck:
|
|
build: .
|
|
image: healthcheck-container
|
|
container_name: healthcheck
|
|
restart: unless-stopped
|
|
# Host networking exposes the Wi-Fi interface to the container. The app
|
|
# listens on port 9999 on the host directly, so no `ports:` mapping is used.
|
|
network_mode: host
|
|
cap_add:
|
|
- NET_ADMIN
|
|
volumes:
|
|
- healthcheck-data:/data
|
|
environment:
|
|
DEVICE_NAME: pi-livingroom
|
|
WIFI_INTERFACE: wlan0
|
|
WIFI_SCAN_INTERVAL: "60"
|
|
# MQTT_HOST: homeassistant.local
|
|
# MQTT_USERNAME: mqtt
|
|
# MQTT_PASSWORD: secret
|
|
|
|
volumes:
|
|
healthcheck-data:
|