added handling of healthcheck for mealie container

This commit is contained in:
Hugo Willaume 2022-04-27 14:48:32 +02:00
parent 426d446d0c
commit 886be66dcd
2 changed files with 16 additions and 0 deletions

11
adminscripts/healthchecks.sh Executable file
View File

@ -0,0 +1,11 @@
SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
GLOB_DIR=$SCRIPT_DIR/..
SERVICES=( recipes )
for service in "${SERVICES[@]}"
do
cd $GLOB_DIR/$service; ./on-healthcheck-failed.sh;
done

View File

@ -0,0 +1,5 @@
docker ps -f name=mealie --format "{{.Status}}" | grep "unhealthy";
if [ $? -eq 0 ]; then
docker-compose down; docker-compose up -d --build;
fi