Fully functional. FrontEnd remains
This commit is contained in:
17
wait-for-it.sh
Normal file
17
wait-for-it.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
host="$1"
|
||||
shift
|
||||
port="$1"
|
||||
shift
|
||||
timeout=20
|
||||
|
||||
until nc -z "$host" "$port"; do
|
||||
echo "Waiting for $host:$port..."
|
||||
sleep 1
|
||||
timeout=$((timeout - 1))
|
||||
if [ "$timeout" -eq 0 ]; then
|
||||
echo "Error: Timeout while waiting for $host:$port"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user