Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Persistent DB #135

Open
suntong opened this issue Aug 16, 2023 · 4 comments
Open

[Feature Request] Persistent DB #135

suntong opened this issue Aug 16, 2023 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@suntong
Copy link

suntong commented Aug 16, 2023

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

Thanks

@Shpota
Copy link
Owner

Shpota commented Aug 16, 2023

Thank you, I will consider this possibility

@suntong
Copy link
Author

suntong commented Aug 24, 2023

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
Copy link
Owner

Shpota commented Aug 24, 2023

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

@Shpota Shpota added the help wanted Extra attention is needed label Aug 24, 2023
@suntong
Copy link
Author

suntong commented Aug 24, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants