Spaces:
Running
Running
| # 로컬 개발용 — Qdrant(벡터 DB) + FastAPI(검색 에이전트) | |
| # | |
| # 최초 1회 실행 순서: | |
| # 1) docker compose up -d qdrant # 벡터 DB 먼저 기동 | |
| # 2) docker compose run --rm api python scripts/30_apply_renewal_embeddings.py --apply # (이미 했으면 생략) | |
| # 3) docker compose run --rm api python scripts/02_build_vectordb.py --reset # Qdrant에 임베딩 색인 | |
| # 4) docker compose up -d api # API 기동 | |
| # | |
| # 이후: docker compose up -d | |
| # Swagger: http://localhost:8000/docs | |
| # Qdrant UI: http://localhost:6333/dashboard | |
| services: | |
| qdrant: | |
| image: qdrant/qdrant:v1.12.4 | |
| ports: | |
| - "6333:6333" # REST | |
| - "6334:6334" # gRPC | |
| volumes: | |
| - qdrant_storage:/qdrant/storage | |
| restart: unless-stopped | |
| api: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile.api # 루트 Dockerfile은 HF Spaces(Streamlit)용이라 분리 | |
| ports: | |
| - "8000:8000" | |
| env_file: | |
| - .env # Azure 키 등 (AZURE_KEY, AZURE_GPT5_MINI_ENDPOINT ...) | |
| environment: | |
| - QDRANT_URL=http://qdrant:6333 # 컨테이너 네트워크 내부 주소 (.env 기본값 오버라이드) | |
| volumes: | |
| - ./data:/app/data # 메뉴/BM25/쿼리인덱스/종목 마스터 | |
| - ./logs:/app/logs # 검색 로그 | |
| - hf_cache:/app/.hf_cache # bge-m3 모델 캐시 (재빌드 시 재다운로드 방지) | |
| depends_on: | |
| - qdrant | |
| restart: unless-stopped | |
| volumes: | |
| qdrant_storage: | |
| hf_cache: | |