add docker build
This commit is contained in:
parent
5698d86756
commit
fa1b98365b
18 changed files with 686 additions and 0 deletions
17
docker/wait-for
Executable file
17
docker/wait-for
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
TIMEOUT=15
|
||||
|
||||
HOST="$1"
|
||||
PORT="$2"
|
||||
|
||||
for i in `seq $TIMEOUT` ; do
|
||||
nc -z "$HOST" "$PORT" > /dev/null 2>&1
|
||||
result=$?
|
||||
if [ $result -eq 0 ] ; then
|
||||
exit 0
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
echo "Failed to connect to database at $HOST:$PORT" >&2
|
||||
exit 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue