Skip to content

Instantly share code, notes, and snippets.

@batmany13
Created August 21, 2017 07:13
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 batmany13/c4df1a600202ba89ad17385bce6a1934 to your computer and use it in GitHub Desktop.
Save batmany13/c4df1a600202ba89ad17385bce6a1934 to your computer and use it in GitHub Desktop.
Wait for Postgres
- run:
name: Waiting for Postgres to be ready
command: |
for i in `seq 1 10`;
do
psql -h localhost -U $PG_USER $PG_DB -c "\t" && echo DB Up && exit 0
echo -n .
sleep 1
done
echo Failed waiting for Postgres && exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment