-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
Description
Currently we're using Bash process monitoring to supervise the various parts of the Lokole client application that run in Docker:
lokole/docker/client/run-lokole.sh
Lines 14 to 36 in 79a8a9d
"${scriptdir}/run-celery.sh" & | |
celery_pid="$!" | |
"${scriptdir}/run-crontab.sh" & | |
crontab_pid="$!" | |
"${scriptdir}/run-gunicorn.sh" & | |
gunicorn_pid="$!" | |
while :; do | |
if [[ ! -e "/proc/${celery_pid}" ]]; then | |
echo "celery crashed" >&2 | |
exit 1 | |
elif [[ ! -e "/proc/${crontab_pid}" ]]; then | |
echo "crontab crashed" >&2 | |
exit 2 | |
elif [[ ! -e "/proc/${gunicorn_pid}" ]]; then | |
echo "gunicorn crashed" >&2 | |
exit 3 | |
else | |
sleep 10 | |
fi | |
done |
We should replace this with supervisord so that the Dockerized runtime is consistent with the runtime set up by install.py.
Note that supervisord isolates environment variables so we'll need to ensure that all LOKOLE_
and OPWEN_
environment variables in the Docker environment are correctly passed down to the supervisor processes.