What is the alternative to condition form of depends_on in docker-compose Version 3?

There’s been a move away from specifying container dependencies in compose. They’re only valid at startup time and don’t work when dependent containers are restarted at run time. Instead, each container should include mechanism to retry to reconnect to dependent services when the connection is dropped. Many libraries to connect to databases or REST API services have configurable built-in retries. I’d look into that. It is needed for production code anyway.

Leave a Comment