I am running a web server in a container using docker-compose. Web server takes about a minute to load cache from the database before listening on a port. I rely on docker DNS load balancing to discover multiple instances of the web server.
While a web server is still loading cache the requests coming to it will fail, how can I overcome that? Is there a way to notify docker when the web server is bound to a port. I looked at https://docs.docker.com/engine/reference/builder/#healthcheck, am I headed in the right direction or there is better solution to this problem.