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

db persistence #379

Closed
colossus-digital opened this issue Dec 3, 2022 · 5 comments
Closed

db persistence #379

colossus-digital opened this issue Dec 3, 2022 · 5 comments

Comments

@colossus-digital
Copy link

hi, is there a way to make the db persistent ? Every time i stop and restart the containers, all config/data are gone.

Am I doing something wrong?

start : docker-compose up -d --build (I need the build flag every time ? )
stop: docker-compose down

is there something to configure that i am missing (into the .env or the docker-compose.yml files)?

@dillu24
Copy link
Collaborator

dillu24 commented Dec 3, 2022

Hey @colossus-digital I suggest that you run the containers using docker-compose up -d after you build for the first time.

To take down the container you can use docker-compose kill

@colossus-digital
Copy link
Author

colossus-digital commented Dec 3, 2022

tnks, you are right, docker-compose stop or kill is the way to go instead of down but is there a way to make the db's volume persistent?
I can see an empty volumes setting at the bottom of the docker-compose.yml. Could it somehow be used for this purpose?

volumes:
  db-data:

@dillu24
Copy link
Collaborator

dillu24 commented Dec 3, 2022

Yeah it was for that purpose. In fact if you compare the current docker-compose.yml file with the previous version you could see that db-data was used in the mongo service which is something we missed for the current release.

You could try out something similar, but I am not sure wether it would work because it may need further investigation due to the use of replica sets now.

@colossus-digital
Copy link
Author

got it, tnks
As an alternative (temporary), a backup/restore instructions might be helpful
I don't want to risk losing all the settings. They take time to set everything

@dillu24
Copy link
Collaborator

dillu24 commented Dec 5, 2022

Replica of #376

@dillu24 dillu24 closed this as completed Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants