fititnt / uwazi-docker

Dockerized version of Uwazi (“openness" in Swahili). HURIDOCS designed Uwazi to make human rights information more open and accessible to the defenders who need it.
The Unlicense
11 stars 4 forks source link

Should use VOLUME for Uwazi document directory #20

Closed vasyugan closed 5 years ago

vasyugan commented 5 years ago

The contents of the Uwazi document directory and the mongodb database seem to be the two things which contain all the payload of Uwazi. Thus the documents dir should not be part of the Uwazi container but on a separate volume, like the db.

fititnt commented 5 years ago

Just to be sure: did Uwazi also stores data inside the uwazi service? It is not only on the mongodb with extra indices for fast searches on elasticsearch?

If yes, then we have a problem that could need changes to Uwazi itself.

vasyugan commented 5 years ago

That would be the uploaded_documents folder, where all the documents live, and the logs dir.

With an environment variable, it can be stored in a different location, see https://github.com/huridocs/uwazi/issues/2005#issuecomment-429755143

I would suggest passing the environment variable to the uwazi container and adding a named volume or bind mount for the directory.

fititnt commented 5 years ago

Wow. That was really one undocumented feature on the Uwazi itself.

vasyugan commented 5 years ago

I would suggest to add backup and restore functionality that can be passed to the container, similar to "first run", where in backup a database dump and a copy of the uploaded_documents directory are saved on the host and with restore, the reverse is done, plus a run of yarn reindex.

fititnt commented 5 years ago

Created another issue just for that.

And, about the uploaded_documents, that was not really a undocumented feature. Even without the environment variable to move the folder outside the repository, with docker still possible to mount a different volume on any path, but I forgot to setup that explicit and only now someone reported.