goxygen icon indicating copy to clipboard operation
goxygen copied to clipboard

[Feature Request] Persistent DB

Open suntong opened this issue 1 year ago • 4 comments

Please consider putting the db storage folder into docker volumes so as to persistent data between different runs.

Thanks

suntong avatar Aug 16 '23 14:08 suntong

Thank you, I will consider this possibility

Shpota avatar Aug 16 '23 19:08 Shpota

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 avatar Aug 24 '23 02:08 suntong

@suntong thanks, you can create a PR for that if you wish. Otherwise I will look at it once I have time

Shpota avatar Aug 24 '23 08:08 Shpota

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.

suntong avatar Aug 24 '23 13:08 suntong