I have a mongodb service in the docker and trying to config eviction
option for it like the following in the docker compose yaml file:
mongodb-geo:
image: mongo:5.0
hostname: geo-db
volumes:
- geo:/data/db
command: --wiredTigerCacheSizeGB 1 --setParameter wiredTigerEngineRuntimeConfig="eviction=(threads_min=6,threads_max=12)"
restart: always
deploy:
replicas: 1
resources:
limits:
cpus: '0.3'
restart_policy:
condition: any
without the --setParameter
, the service is working well. But, using that, the service will not run.
So, my question is how to set eviction
for the MongoDB in docker compose yaml file?
More Context
What I am doing here is based on the MongoDB documentation for setting parameters and this post.