Created
August 20, 2019 14:17
-
-
Save thekarel/efff8089f8031f80ba05b133892f5c2f to your computer and use it in GitHub Desktop.
Wait for Postgres from Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RETRIES=30 | |
until docker exec -t $CONTAINERNAME psql -U postgres -c \\d > /dev/null || [ $RETRIES -eq 0 ]; do | |
echo "Waiting for postgres server, $((RETRIES--))..." | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment