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

use bind mounts instead of named volumes #38

Open
vasyugan opened this issue Nov 30, 2018 · 1 comment
Open

use bind mounts instead of named volumes #38

vasyugan opened this issue Nov 30, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@vasyugan
Copy link
Contributor

vasyugan commented Nov 30, 2018

This is maybe a matter of taste, but I find the use of bind mount for databases, documents and dumps preferable over using named docker volumes, because it eases backup and restore, it survives when I wipe /var/lib/docker, so my precious user data is safe.
So in my local install, the uwazi service has the following volume parameter:

volumes:
  - ./documents:/home/node/documents
  - ./dump:/home/node/dump
  - ./log:/home/node/log

and mongo has:

volumes:
 - ./data/mongo:/data/db
 - ./dump:/dump

I don't care about elasticsearch, because in my understanding, that's no persistent data. I have added a directory for dumps, because for backup purposes I do a daily mongodump and I want to have access to it.

@fititnt
Copy link
Owner

fititnt commented Nov 30, 2018

I agree. In fact it was the the default before use of volumes and I personally like to use the way you do in production.

What do you think about, to start, add these information as additional comment on the docker-compose.yml for now, and eventually we consider put (or not) as default?

Also, maybe with these comments, experience, etc we eventually will archive some docker-compose for production usage (see https://docs.docker.com/compose/production/)

@fititnt fititnt added the enhancement New feature or request label Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants