Switch to using ansible wait_for instead of sleep

In the startup script for docker-compose
This commit is contained in:
Matthew Jones
2015-09-10 09:32:01 -04:00
parent 7263367c6d
commit f61a01b504

View File

@@ -1,7 +1,9 @@
#!/bin/bash #!/bin/bash
# We need to give the databases enough time to start up (switch to using ansible's wait_for here) # Wait for the databases to come up
sleep 20 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 # 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 /etc/init.d/ssh start