added handling of healthcheck for mealie container
This commit is contained in:
parent
426d446d0c
commit
886be66dcd
11
adminscripts/healthchecks.sh
Executable file
11
adminscripts/healthchecks.sh
Executable 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
|
||||||
|
|
5
recipes/on-healthcheck-failed.sh
Executable file
5
recipes/on-healthcheck-failed.sh
Executable 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
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user