azure-cosmos-db-emulator-docker
azure-cosmos-db-emulator-docker copied to clipboard
AZURE_COSMOS_EMULATOR_PARTITION_COUNT is ignored
Describe the bug
When starting the container, it seems to "sort of" ignore the AZURE_COSMOS_EMULATOR_PARTITION_COUNT
environment variable and always tries to start 11 partitions.
I set AZURE_COSMOS_EMULATOR_PARTITION_COUNT=4
and this was the log output in docker:
My compose file:
version: "3.9"
volumes:
cosmos-db-volume:
networks:
customnet:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.55.0/24
gateway: 192.168.55.1
services:
cosmosdb:
image: "mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest"
restart: unless-stopped
deploy:
resources:
limits:
cpus: '2.0'
memory: 3G
environment:
- AZURE_COSMOS_EMULATOR_PARTITION_COUNT=4
- AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE=true
- AZURE_COSMOS_EMULATOR_IP_ADDRESS_OVERRIDE=127.0.1.1
ports:
- "8081:8081"
- "8900:8900"
- "8901:8901"
- "8979:8979"
- "10250-10256:10250-10256"
- "10350:10350"
networks:
customnet:
ipv4_address: 192.168.55.20
volumes:
- cosmos-db-volume:/tmp/cosmos/appdata
Expected behavior It should only start the number of partitions specified.
Desktop (please complete the following information):
- OS: Windows 11
**Docker Images Used: **
- Linux <--
**Arguments && Environment variables to start Docker:
Docker Environment
- Docker compose Additional context Add any other context about the problem here.
Hi @hades200082, Emulator is picking up number of partitions that were created for the initially (first time when partitions were created) in the volume. We are looking into this. For now, you could try creating a new volume if you want to change the partition count or remove the volume if you don't want data persistence.