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

Startup order of containers #1567

Closed
delasource opened this issue Nov 25, 2022 · 2 comments
Closed

Startup order of containers #1567

delasource opened this issue Nov 25, 2022 · 2 comments

Comments

@delasource
Copy link

Is your feature request related to a problem? Please describe.
I have caprover running about 30 different apps. Some of which do some CPU heavy work on startup. So when i reboot the host, the startup order of apps seems to be random, depending on how fast the threads do finish. In some cases, apps are started earlier then their respective database containers. This problem did not exist, with just a few apps, but now with 30 containers launching at host startup, is a problem.
In the recent days i had to reboot the host a couple of times (because of stupid things with docker swarm networking, dont get me started) - and in the current situation i have to manually check each app if it had finished their startup tasks correctly.

Describe the solution you'd like
I'd like to set container dependencies like it is possible in Kubernetes or even docker-compose, so containers only start if their dependencies are healthy.
This is the same feature request as #813 #807 #795 #793 and i fairly think it is required. I understand app resilience but in some cases there is no perfect solution.

alternatives
A "container-startup-order after reboot" would be nice, to reduce the load of the host system. This could also be used to prioritize services, so a reboot has minimal outage on the essential services.

@githubsaturn
Copy link
Collaborator

The underlying management of services is not by CapRover, but it's done by Docker swarm. Hence there is nothing CapRover can do to change this ordering. You can ask your question in Docker forum and there might be able solution for it.

PS1:

I'd like to set container dependencies like it is possible in Kubernetes or even docker-compose, so containers only start if their dependencies are healthy.

Docker compose dependency graph only applies to the initial launch. Not the subsequent restarts.

PS2:
All other posts you linked are spams only by one user.

@delasource
Copy link
Author

i'll link this issue here moby/moby#31333

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

No branches or pull requests

2 participants