I am facing problem using docker-compose to link a django container with postgres and mongo containers? I am trying to use \"docker-compose up\" which starts up the mongo and po
The problem you face is that the application container and the DB container start independently from each other and most importantly, the app container won't wait until the DB container is started. There is as of docker compose 1.1.0 no feature which would allow to consider such dependencies.
This is a well known problem and has been discussed already. Consensus seems to be that this should not be solved on a docker compose level but in docker itself. There is a proposal already for the groundwork in docker.
In my case, I just built this kind of intelligence in the application itself. I check for port connectivity until successful and then start the rest of the application.