Switch Repo to notatio/notatio
This commit is contained in:
commit
9da51a1e6b
26 changed files with 4117 additions and 0 deletions
14
wait-for-postgres.sh
Executable file
14
wait-for-postgres.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
host="$1"
|
||||
port="$2"
|
||||
shift 2
|
||||
cmd="$@"
|
||||
|
||||
until nc -z -v -w1 "$host" "$port"; do
|
||||
>&2 echo "PostgreSQL is unavailable - sleeping"
|
||||
sleep 5
|
||||
done
|
||||
|
||||
>&2 echo "PostgreSQL is up - executing command"
|
||||
exec $cmd
|
Loading…
Add table
Add a link
Reference in a new issue