diff --git a/tools/docker-compose/start_development.sh b/tools/docker-compose/start_development.sh index f2267a85ce..9c7f23f063 100755 --- a/tools/docker-compose/start_development.sh +++ b/tools/docker-compose/start_development.sh @@ -1,7 +1,9 @@ #!/bin/bash -# We need to give the databases enough time to start up (switch to using ansible's wait_for here) -sleep 20 +# Wait for the databases to come up +ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=postgres port=5432" all +ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=redis port=6379" all +ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=mongo port=27017" all # In case Tower in the container wants to connect to itself, use "docker exec" to attach to the container otherwise /etc/init.d/ssh start