Squashed commit message
Some checks are pending
Telegram Mini App Shop Builder / Compute version metadata (push) Waiting to run
Telegram Mini App Shop Builder / Run Frontend tests (push) Waiting to run
Telegram Mini App Shop Builder / Run Backend tests (push) Waiting to run
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Waiting to run
Telegram Mini App Shop Builder / Build module. (push) Blocked by required conditions
Telegram Mini App Shop Builder / release (push) Blocked by required conditions
Some checks are pending
Telegram Mini App Shop Builder / Compute version metadata (push) Waiting to run
Telegram Mini App Shop Builder / Run Frontend tests (push) Waiting to run
Telegram Mini App Shop Builder / Run Backend tests (push) Waiting to run
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Waiting to run
Telegram Mini App Shop Builder / Build module. (push) Blocked by required conditions
Telegram Mini App Shop Builder / release (push) Blocked by required conditions
This commit is contained in:
24
scripts/wait_for_mysql.sh
Normal file
24
scripts/wait_for_mysql.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
MYSQL_SERVICE="mysql"
|
||||
|
||||
function check_mysql {
|
||||
docker compose exec $MYSQL_SERVICE mysqladmin ping --silent
|
||||
}
|
||||
|
||||
echo "Waiting for MySQL..."
|
||||
|
||||
MAX_WAIT_TIME=60
|
||||
WAIT_TIME=0
|
||||
|
||||
while ! check_mysql; do
|
||||
if [ $WAIT_TIME -ge $MAX_WAIT_TIME ]; then
|
||||
echo "MySQL has not been available for $MAX_WAIT_TIME secods. Exit."
|
||||
exit 1
|
||||
fi
|
||||
sleep 1
|
||||
WAIT_TIME=$((WAIT_TIME + 1))
|
||||
done
|
||||
|
||||
sleep 5
|
||||
echo "MySQL ready."
|
||||
Reference in New Issue
Block a user