Use docker network for health check
This commit is contained in:
@@ -13,11 +13,11 @@ docker compose -f "$COMPOSE_FILE" down 2>/dev/null || true
|
||||
echo "📦 Starting services..."
|
||||
docker compose -f "$COMPOSE_FILE" up -d
|
||||
|
||||
# Wait for frontend to be ready
|
||||
# Wait for frontend to be ready (run curl inside docker network)
|
||||
echo "⏳ Waiting for services..."
|
||||
MAX_RETRIES=30
|
||||
RETRY_COUNT=0
|
||||
until curl -s -o /dev/null -w "%{http_code}" http://frontend:3000/ | grep -q "200" || [ $RETRY_COUNT -eq $MAX_RETRIES ]; do
|
||||
until docker run --rm --network harborforgetest_test-network curlimages/curl -s -o /dev/null -w "%{http_code}" http://frontend:3000/ 2>/dev/null | grep -q "200" || [ $RETRY_COUNT -eq $MAX_RETRIES ]; do
|
||||
echo " Waiting for frontend... ($RETRY_COUNT/$MAX_RETRIES)"
|
||||
sleep 2
|
||||
RETRY_COUNT=$((RETRY_COUNT+1))
|
||||
|
||||
Reference in New Issue
Block a user