This directory contains the initialization setup for Qdrant to automatically create the "documents" collection when the system starts.
The initialization service:
- Waits for Qdrant to be ready
- Checks if the "documents" collection already exists
- Creates the "documents" collection if it doesn't exist
The "documents" collection is created with the following configuration:
- Vector size: 1536 (compatible with OpenAI embeddings)
- Distance metric: Cosine similarity
- Optimizers: Default segment number of 2
- Replication factor: 1
init.py
- Main initialization scriptDockerfile
- Container configuration for the init servicerequirements.txt
- Python dependencies
The initialization service runs automatically when you start the Docker Compose stack. It will:
- Run once when the system starts
- Exit after successful initialization
- Not restart automatically (restart: "no")
To manually run the initialization:
docker-compose up qdrant-init
QDRANT_URL
- URL of the Qdrant service (default: http://qdrant:6333)