Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container shutdown speed fix #554

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Deelite34
Copy link

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

After:
obraz

Migrations:

N/A

New imports / dependencies:

N/A

What tests do I need to run to validate this change:

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant