Adds health checks to web and data_handler container; restarting on failure #24

Open
ViMaSter wants to merge 5 commits from healthcheck into main
Showing only changes of commit 73e9c279df - Show all commits

feat: Adds healthcheck that restarts data_handler, when any error is printed to log files

Vincent Mahnke 2025-10-25 21:21:06 +02:00
Signed by: ViMaSter
GPG key ID: 6D787326BA7D6469

View file

@ -57,6 +57,13 @@ services:
db: db:
condition: service_healthy condition: service_healthy
restart: true restart: true
# if the latest `update_camera_*.log` contains "error", fail the healthcheck
healthcheck:
test: ["CMD", "sh", "-c", "ls /var/log | grep '^update_camera_' | xargs -I {} sh -c 'grep -q error /var/log/{} || exit 0; exit 1'"]
interval: 10s
timeout: 5s
start_period: 30s
retries: 5
volumes: volumes:
mariadb: mariadb: