-
Notifications
You must be signed in to change notification settings - Fork 98
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
Why using supervisord inside docker? #104
Comments
Hi, It is essential for managing multiple processes (services) within a container or executing one-time commands efficiently. Could you please provide more detailed information about healthcheck problem? |
I’ve replied this in the PR instead here… so copy / pasted…: No real issues with health check, it’s just managed by docker I didn’t know that you must run supervisor in order to support multiple workers, I though it was part of the service. In that the case, this PR can be closed, but maybe a bit more of investigation is required. |
I will help a little here with some clarifications. I think you should not use services and processes as synonyms. The recommended policy of docker is, that each container should only execute one service but can execute multiple processes (e.g., multiple processes). Services and processes are something different in their naming. From: https://docs.docker.com/engine/containers/multi-service_container/:
So it's not a good idea to pack different services inside a container. This gets even worse if you use container orchestration like Kubernetes. If the main process will never crash, even if the container is in a non-working state, k8s is unable to detect this and unable to do the self-healing. You can work around with a health check, like you did here, but it's important that this health check is binary (running / not running) and not something like “partial running”. But I don't see an issue here. |
Hi, thanks for reply, but I did not created the dockerfile, just commented that supervisord was used and I'm not sure if it's necessary. What I still not know if it's required supervisord, but I finally didn't use this for my production application because octane have some issues with livewire. |
Hi,
This seems to be a stupid question, so let me explain:
Docker itself is designed to handle the service stops, if it stops, the docker get stopped BUT it will automatically restart (if is well configured). So I cannot understand the need of using
supervisord
atstart-container
.Also, there is a healthcheck in case of something weird, that will force docker to reboot again.
The text was updated successfully, but these errors were encountered: