I would like to persist the mongoDB
data outside of the container and on a specified volume. I am using docker-compose and the yml file looks like
web:
build: .
command: python -u app.py
ports:
- "5000:5000"
volumes:
- .:/todo
links:
- db
db:
image: mongo:3.0.2
As documented on the docker hub page for that image (https://hub.docker.com/_/mongo/) you can use
volumes:
- './data:/data/db'
Which will use the host path ./data