vk_hackathon/docker-compose.yml
q 1f976cf297 Add logviewer project and fix Docker imports
- Add logviewer/: Dozzle web UI (port 9999) + analyze.py CLI tool
- docker-compose.yml: add json-file logging with rotation and labels for index/search
- Fix Dockerfiles: COPY *.py . so all modules are included in image
- Convert all relative imports to flat absolute imports for Docker flat layout
- Rename index/schemas.py → index/index_schemas.py to avoid module name collision with search/schemas.py in test runner
- Update all tests to add service dir to sys.path and use flat imports

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 15:26:11 +03:00

75 lines
1.6 KiB
YAML

services:
qdrant:
image: qdrant/qdrant:v1.14.1
ports:
- "6334:6333"
qdrant-init:
image: curlimages/curl:8.12.1
env_file:
- .env
depends_on:
- qdrant
command:
- sh
- -c
- |
until curl -sf "$$QDRANT_URL/collections"; do
sleep 1
done
if curl -sf "$$QDRANT_URL/collections/$$QDRANT_COLLECTION_NAME" >/dev/null; then
exit 0
fi
curl -sf -X PUT "$$QDRANT_URL/collections/$$QDRANT_COLLECTION_NAME" \
-H 'Content-Type: application/json' \
-d "{
\"vectors\": {
\"$$QDRANT_DENSE_VECTOR_NAME\": {
\"size\": 1024,
\"distance\": \"Cosine\"
}
},
\"sparse_vectors\": {
\"$$QDRANT_SPARSE_VECTOR_NAME\": {
\"modifier\": \"idf\"
}
}
}"
restart: "no"
index:
build:
context: ./index
depends_on:
- qdrant
ports:
- "8001:8000"
logging:
driver: json-file
options:
max-size: "20m"
max-file: "5"
tag: "index-service"
labels: "service"
labels:
- "service=index-service"
search:
build:
context: ./search
env_file:
- .env
depends_on:
qdrant-init:
condition: service_completed_successfully
ports:
- "8002:8000"
logging:
driver: json-file
options:
max-size: "20m"
max-file: "5"
tag: "search-service"
labels: "service"
labels:
- "service=search-service"