Skip to content

Add supervisor to run-lokole.sh #455

@c-w

Description

@c-w

Currently we're using Bash process monitoring to supervise the various parts of the Lokole client application that run in Docker:

"${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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions