Adds minor optimization and speeds up frontend and backend applications shutdown in docker, by making them correctly receive SIGTERM signal from docker.
exec makes frontend/backend app commands executed in entrypoint scripts main processes instead subprocesses of entrypoint script in their containers, which fails to pass termination signals to them.
init: true setting in docker makes apps executed with the entrypoint script subprocesses of dummy PID: 1 init process that will pass signals correctly to the application subprocess and avoid theorical issues with making frontend/backend app main processes.
Story / Bug id:
N/A
Description:
Adds minor optimization and speeds up frontend and backend applications shutdown in docker, by making them correctly receive SIGTERM signal from docker.
exec
makes frontend/backend app commands executed in entrypoint scripts main processes instead subprocesses of entrypoint script in their containers, which fails to pass termination signals to them.init: true
setting in docker makes apps executed with the entrypoint script subprocesses of dummy PID: 1 init process that will pass signals correctly to the application subprocess and avoid theorical issues with making frontend/backend app main processes.https://buddy.works/tutorials/optimizing-dockerfile-for-node-js-part-1#reducing-the-number-of-processes https://hynek.me/articles/docker-signals/#bonus-best-practice-let-someone-else-be-pid-1 https://engineeringblog.yelp.com/2016/01/dumb-init-an-init-for-docker.html
Before:![obraz](https://github.com/CodeForPoznan/codeforpoznan.pl_v3/assets/35972878/47935b57-1b81-42f5-8653-f1988cde09d2)
After:![obraz](https://github.com/CodeForPoznan/codeforpoznan.pl_v3/assets/35972878/c02e105b-d15b-4a53-aadf-bf90fa5c0106)
Migrations:
N/A
New imports / dependencies:
N/A
What tests do I need to run to validate this change:
N/A