Skip to content

Instantly share code, notes, and snippets.

@munhitsu
Created March 4, 2016 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save munhitsu/c0d0bff53ad5219818cd to your computer and use it in GitHub Desktop.
Save munhitsu/c0d0bff53ad5219818cd to your computer and use it in GitHub Desktop.
wait for postgresql (i.e. within docker container)
until nc -z ${POSTGRES_PORT_5432_TCP_ADDR} ${POSTGRES_PORT_5432_TCP_PORT}; do
echo "$(date) - waiting for postgres..."
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment