vivo-project / VIVO

VIVO is an extensible semantic web application for research discovery and showcasing scholarly work
http://vivoweb.org
BSD 3-Clause "New" or "Revised" License
202 stars 127 forks source link

Solr index directory mount with docker-compose issue #3857

Closed max1c closed 1 year ago

max1c commented 1 year ago

Describe the bug The Solr index rebuild takes about 4 hours. This is a long time to wait so we would like to copy/paste the previously pre-built index. However, when adding a custom volume to docker-compose.yml for solr index to avoid rebuild we get an error.

To Reproduce Steps to reproduce the behavior in docker-compose.yml before starting the images:

volumes:
        - /vivo-home/index:/opt/solr/server/solr/mycores/vivocore/data/index

mv: cannot move '/index/' to '/opt/solr/server/solr/mycores/vivocore/data/index/': Directory not empty

Expected behavior The volume mount should be taken by the container and index without errors.

Environment (please complete the following information):

chenejac commented 1 year ago

@wwelling can you also please check whether Installation instructions by using Docker should be improved at https://github.com/vivo-project/VIVO/blob/main/README.md#installation-instructions? If yes, please suggest improvements.

ghost commented 1 year ago

The volume has to be mounted at the parent of the vivocore directory at /opt/solr/server/solr/mycores

Please see

https://github.com/vivo-project/VIVO/pull/3844/files#diff-e45e45baeda1c1e73482975a664062aa56f20c03dd9d64a827aba57775bed0d3R17

michael-bentz commented 1 year ago

Mounting the volume at the parent directory (opt/solr/server/solr/mycores) fixes the issue for us.