From ad8cd6993966f8337518d105842c445237a03b9f Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Tue, 26 Sep 2023 12:10:50 +1000 Subject: [PATCH] adding sleep as a catch-all, its useful when python code kills gunicorn, at least the container stays up and I can get into it and debug --- wrapper.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wrapper.sh b/wrapper.sh index 43bfaff..7617cb0 100755 --- a/wrapper.sh +++ b/wrapper.sh @@ -2,3 +2,6 @@ su mythtv -g mythtv -c 'ENV="production" python3 -u /code/pa_job_manager.py' &> /var/log/pa_job_manager.out & gunicorn --bind=0.0.0.0:443 --workers=4 --threads=16 --certfile /etc/letsencrypt/live/pa.depaoli.id.au/fullchain.pem --keyfile /etc/letsencrypt/live/pa.depaoli.id.au/privkey.pem main:app --env ENV="production" --error-logfile gunicorn.error.log --access-logfile gunicorn.log --capture-output +# this should never be invoked unless gunicorn fails -- in that case, at least +# we will keep the container can login by hand and check the issue/error +sleep 99999