From 22a625d354175031cd2014dd781f5294b0a4a256 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Mon, 2 Oct 2023 18:45:03 +1100 Subject: [PATCH] added failsafe to keep container up if python is so broke it kills gunicorn on init --- wrapper.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wrapper.sh b/wrapper.sh index bf00361..920f4cb 100755 --- a/wrapper.sh +++ b/wrapper.sh @@ -5,5 +5,7 @@ if [ "$FLASK_ENV" == "production" ]; then else cd /pybook_mapped_volume gunicorn --bind=0.0.0.0:5000 --workers=1 --threads=1 main:app --env FLASK_ENV="$FLASK_ENV" --error-logfile gunicorn.error.log --access-logfile gunicorn.log --capture-output --enable-stdio-inheritance --reload + # just in case it fails + sleep 10000 fi