Files
ai-resume/deploy/qdrant.yml

67 lines
2.2 KiB
YAML

# Qdrant for the corpus (docs/phase-4-corpus.md, reference/stack.md).
#
# mem_limit == memswap_limit == 400m the cap in the memory budget, and the
# container cannot reach host swap
# ports on 127.0.0.1 only Caddy on .35 is the only public listener
# its own compose project stopping or recreating it cannot disturb
# the Mode A site (test A1 still passes:
# the site never calls Qdrant)
#
# Run on the runtime host (.13):
#
# docker compose -f deploy/qdrant.yml up -d
# curl -s http://127.0.0.1:6333/ # must answer with a version
#
# Then, in the corpus environment (RESUME_QDRANT_URL is already the default):
#
# python3 -m corpus.cli rebuild
#
# Deleting the volume is always recoverable: `rebuild` re-derives every vector
# from content/.
name: ai-resume-index
services:
qdrant:
image: qdrant/qdrant:v1.20.0
container_name: ai-resume-qdrant
restart: unless-stopped
mem_limit: 400m
memswap_limit: 400m
ports:
- "127.0.0.1:6333:6333" # REST — the pipeline and the query service use this
- "127.0.0.1:6334:6334" # gRPC — reserved for the Phase 5 query service
volumes:
- qdrant_storage:/qdrant/storage
environment:
# The corpus is ~1k chunks today and the measurement in
# reference/stack.md records the ceiling. Keep the HNSW defaults; do not
# tune for speed on a memory-bound host.
QDRANT__TELEMETRY_DISABLED: "true"
QDRANT__LOG_LEVEL: "WARN"
logging:
driver: json-file
options:
max-size: 10m
max-file: "3"
healthcheck:
test: ["CMD-SHELL", "bash -c '</dev/tcp/127.0.0.1/6333' || exit 1"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
# The host's docker daemon has every default address pool allocated by other
# projects, so an implicit compose network cannot be created here. Pin a /28 of
# RFC1918 space that no other bridge uses; it is separate from the site's
# 10.89.0.0/28 so stopping one project cannot disturb the other.
networks:
default:
ipam:
config:
- subnet: 10.89.0.16/28
gateway: 10.89.0.17
volumes:
qdrant_storage: