Open suntong opened 1 year ago
Thank you, I will consider this possibility
From https://earthly.dev/blog/mongodb-docker/
By default, the MongoDB image stores its data in the /data/db directory. You can mount a volume to this location to enable data persistence.
docker run -d -p 27017:27017 --name test-mongo -v data-vol:/data/db mongo:latest
I think it is as simple as that, when only docker
command is concerned.
@suntong thanks, you can create a PR for that if you wish. Otherwise I will look at it once I have time
Take your time, this is new to me, as you can see that it took me a while from raising the issue to find a solution, and making sure it has no side-effects might take me much longer.
Please consider putting the db storage folder into docker volumes so as to persistent data between different runs.
Thanks