From 73e9c279df72d8d3ce3fc52a9a2fd792bb67dc30 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 25 Oct 2025 21:21:06 +0200 Subject: [PATCH] feat: Adds healthcheck that restarts `data_handler`, when any error is printed to log files --- docker-compose.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 7c43cda..befbc6d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -57,6 +57,13 @@ services: db: condition: service_healthy 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: mariadb: \ No newline at end of file