#!/bin/sh set -eu ROOT="$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)" cd "$ROOT/Lido" docker compose -f docker-compose.yml restart db api redis BASE_URL="${BASE_URL:-http://127.0.0.1:8080}" i=0 while [ "$i" -lt 60 ]; do if curl -sf "$BASE_URL/health/live" >/dev/null 2>&1 \ || curl -sf "$BASE_URL/actuator/health" >/dev/null 2>&1; then exit 0 fi i=$((i + 1)) sleep 1 done echo "API not ready" >&2 exit 1