This document provides a quick guide on setting up Weaviate and Qdrant with Docker Compose. Follow the steps below to ensure a smooth setup.
- Create Data Folder:
Before running
docker-compose up
, create folders namedweaviate_data
andqdrant_data
in the same directory as yourdocker-compose.yml
file.
mkdir weaviate_data
mkdir qdrant_data
- Rename Environment File:
Rename the file
.env.example
to.env
.
mv .env.example .env
- Update API Key:
Open the
.env
file and replace the placeholder text with your actualOPENAI_APIKEY
.
OPENAI_APIKEY=your_api_key_here
Now you are ready to deploy Weaviate and Qdrant using Docker Compose. The profiles
option in the docker-compose.yml
file is crucial for controlling which services are started when you run Docker Compose. Each service in the docker-compose.yml
file has a profiles
property which contains the profiles under which the service should be run.
- Running Weaviate: To start the Weaviate service, use the following command:
docker compose --profile weaviate up
- Running Qdrant: To start the Qdrant service, use the following command:
docker compose --profile qdrant up
- Running Both Services: If you want to run both Weaviate and Qdrant services at the same time, you can specify both profiles in the command:
docker compose --profile weaviate --profile qdrant up
This way, you can control which services are started and run them either individually or together based on the profiles specified in the docker-compose.yml
file.