select order and delay startup of containers

Hi,

Is there a way to select the order and/or delay the startup of containers? (to reduce load during boot process)

Thank! :wink:

Hi there, you could try using the depends_on setting in your docker-compose file Compose file version 2 reference | Docker Documentation

However I think this will only ensure that a container will start once the depends_on containers have started - there is no way to ensure that they are “ready”. To do this, I think that your containers would have to have they’re own logic that checks to ensure that the other relevant containers are in a usable state before doing what they needs to do.

Hope this helps!

1 Like