#!/usr/bin/env bash # Qdrant 컨테이너가 준비될 때까지 대기 후 메인 프로세스 실행. # depends_on만으로는 "시작"만 보장하고 "준비 완료"는 보장하지 않으므로 폴링한다. set -e echo "[entrypoint] Qdrant 준비 대기: ${QDRANT_URL:-http://localhost:6333}" python - <<'PY' import os, time, urllib.request base = os.environ.get("QDRANT_URL", "http://localhost:6333").rstrip("/") url = base + "/readyz" for i in range(60): try: urllib.request.urlopen(url, timeout=2) print(f"[entrypoint] Qdrant ready ({url})") break except Exception: time.sleep(1) else: print("[entrypoint] 경고: Qdrant 준비 확인 실패 — 그래도 계속 진행") PY exec "$@"