Skip to content

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