Configure Milvus with Docker Compose
This topic describes how to configure Milvus components and its third-party dependencies with Docker Compose.
Download a configuration file
Download milvus.yaml directly or with the following command.
$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.6.4/configs/milvus.yaml
Modify the configuration file
Configure your Milvus instance to suit your application scenarios by adjusting corresponding parameters in milvus.yaml.
Check the following links for more information about each parameter.
Sorted by:
| Dependencies | Components |
|---|---|
Download an installation file
Download the installation file for Milvus standalone, and save it as docker-compose.yml.
You can also simply run the following command.
# For Milvus standalone
$ wget https://github.com/milvus-io/milvus/releases/download/v2.6.4/milvus-standalone-docker-compose.yml -O docker-compose.yml
Modify the installation file
In docker-compose.yml, add a volumes section under each milvus-standalone.
Map the local path to your milvus.yaml file onto the corresponding docker container paths to the configuration files /milvus/configs/milvus.yaml under all volumes sections.
...
standalone:
container_name: milvus-standalone
image: milvusdb/milvus:v2.2.13
command: ["milvus", "run", "standalone"]
environment:
ETCD_ENDPOINTS: etcd:2379
MINIO_ADDRESS: minio:9000
volumes:
- /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml # Map the local path to the container path
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus
ports:
- "19530:19530"
- "9091:9091"
depends_on:
- "etcd"
- "minio"
...
/volumes folder according to the default configuration in docker-compose.yml. To change the folder to store data, edit docker-compose.yml or run $ export DOCKER_VOLUME_DIRECTORY=.
Start Milvus
Having finished modifying the configuration file and installation file, you can then start Milvus.
$ sudo docker compose up -d
What’s next
- Learn how to manage the following Milvus dependencies with Docker Compose or Helm: