Closed EsGeh closed 5 years ago
whats the output of docker volume ls
on your system, i.e. does it show the default exist_data volume?
This is the output of docker-volume ls
:
$ docker volume ls
DRIVER VOLUME NAME
no volumes are shown. (I cleaned unneeded volumes using docker volume prune
before starting the container)
i can't do a full debug run of you compose file right now, but the problem seems to be that exist doesn't know about the changed data-dir path. So ii falls back to an internal container path, which since its internal, is ephemeral.
You need to change your set-up so that either the existdb image is properly configured with a different data-dir path, which can then be mounted from a local dir via your compose file. Or tweak your compose file in line with the one in this repo, which is declaring the default data-dir path as a volume inside of the exist via the .env
file container, so it becomes persistent .
PS.: You can see where exist thinks its data-dir is, at the start of the exist.log
I solved this:
It is decisive to first copy the exist config dir and data dir from the container.
(Because I think exist fails if /exist/config
and /exist/webapp/WEB-INF/data
are empty.)
My current solution is this:
/exist/config
, or /exist/webapp/WEB-INF/data
/exist/config
and /exist/webapp/WEB-INF/data
from the container to runtime_data/exist-config
resp. runtime_data/exist-data
(like described in the READMEdocker-compose up xmldb
to run the container with the actual docker-compose file, which mounts the local dirs runtime_data/exist-config
or runtime_data/exist-data
to the corresponding paths in the container PLUS the xml files I want to load into existdocker-compose exec xmldb java -jar start.jar client --no-gui
into the container and load resources into the databasedocker-compose down
I hope this helps others
I am not able to persist any data over container restarts. Demonstration:
docker-compose.yaml:
Now when i issue these commands ...
no data is saved in my volume:
also, when restarting the container, all settings are lost ( my collection
test
doesn't exist) !:What am I missing here?