forked from kamba4/sunders
feat: Adds healthcheck that restarts data_handler, when any error is printed to log files
This commit is contained in:
parent
f94080f45f
commit
73e9c279df
1 changed files with 7 additions and 0 deletions
|
|
@ -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:
|
||||
Loading…
Add table
Add a link
Reference in a new issue