chore: align local-up.sh with spec
This commit is contained in:
@@ -13,31 +13,29 @@ RETRY_COUNT=0
|
||||
until docker exec mci-mysql mysql -uroot -proot -e "SELECT 1" > /dev/null 2>&1; do
|
||||
RETRY_COUNT=$((RETRY_COUNT + 1))
|
||||
if [ "$RETRY_COUNT" -ge "$MAX_RETRIES" ]; then
|
||||
echo "Error: MySQL did not become ready within ${MAX_RETRIES} seconds." >&2
|
||||
echo "MySQL did not become ready within ${MAX_RETRIES} seconds."
|
||||
exit 1
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "Waiting for Redis..."
|
||||
MAX_RETRIES=30
|
||||
RETRY_COUNT=0
|
||||
until docker exec mci-redis redis-cli ping | grep -q "PONG"; do
|
||||
until redis-cli -h localhost -p 6379 ping | grep -q "PONG"; do
|
||||
RETRY_COUNT=$((RETRY_COUNT + 1))
|
||||
if [ "$RETRY_COUNT" -ge "$MAX_RETRIES" ]; then
|
||||
echo "Error: Redis did not become ready within ${MAX_RETRIES} seconds." >&2
|
||||
if [ "$RETRY_COUNT" -ge 30 ]; then
|
||||
echo "Redis did not become ready within 30 seconds."
|
||||
exit 1
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "Waiting for RabbitMQ..."
|
||||
MAX_RETRIES=30
|
||||
RETRY_COUNT=0
|
||||
until curl -s -o /dev/null -w "%{http_code}" http://guest:guest@localhost:15672/api/overview | grep -q "200"; do
|
||||
RETRY_COUNT=$((RETRY_COUNT + 1))
|
||||
if [ "$RETRY_COUNT" -ge "$MAX_RETRIES" ]; then
|
||||
echo "Error: RabbitMQ did not become ready within ${MAX_RETRIES} seconds." >&2
|
||||
if [ "$RETRY_COUNT" -ge 30 ]; then
|
||||
echo "RabbitMQ did not become ready within 30 seconds."
|
||||
exit 1
|
||||
fi
|
||||
sleep 1
|
||||
|
||||
Reference in New Issue
Block a user