When restarting the docker container, it always takes 10 seconds to restart since the SIGTERM message isn't passed to node. After 10 seconds, a SIGKILL will be send to forcefully terminate the container.
This PR uses exec to start the program in the init script. This helps with signal handling so a SIGTERM is passed trough to the node app. This is only one part of the fix, since currently the node app is ignoring SIGTERM messages (what it shouldn't). I will also open a fix there.
When restarting the docker container, it always takes 10 seconds to restart since the SIGTERM message isn't passed to node. After 10 seconds, a SIGKILL will be send to forcefully terminate the container.
This PR uses
exec
to start the program in the init script. This helps with signal handling so a SIGTERM is passed trough to the node app. This is only one part of the fix, since currently the node app is ignoring SIGTERM messages (what it shouldn't). I will also open a fix there.See for more information: https://hynek.me/articles/docker-signals/