eLife is an open-access journal and technology provider that publishes promising research in the life and biomedical sciences. This is their implementation of a submission and peer review system based on Coko PubSweet and xPub.
Note: A process running as PID 1 inside a container is treated specially by Linux: it ignores any signal with the default action. So, the process will not terminate on SIGINT or SIGTERM unless it is coded to do so.
Hence we need to write a wrapper script to replace the current command in docker-compose script that will:
When running on a docker container, the /bin/sh is the main process with PID 1. According to docker documentation (https://docs.docker.com/engine/reference/run/#foreground)
Hence we need to write a wrapper script to replace the current command in docker-compose script that will:
Found a blog post from codeship that should help: https://blog.codeship.com/trapping-signals-in-docker-containers/
This ticket follows from #1676