Shpota / goxygen

Generate a modern Web project with Go and Angular, React, or Vue in seconds 🎲
https://goxygen.dev
Apache License 2.0
3.53k stars 219 forks source link

[Feature Request] Persistent DB #135

Open suntong opened 1 year ago

suntong commented 1 year ago

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

Thanks

Shpota commented 1 year ago

Thank you, I will consider this possibility

suntong commented 1 year ago

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.

Shpota commented 1 year ago

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

suntong commented 1 year ago

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.