What is the best practice to add a volume (external persistent storage) to the exist-db official image?
My main goal is to mount external storage to save there new files, and the exist will update/store them to the db and to it data file(__contents __.xml).
Backup / Restore will be from this volume.
Currently I install the exist-db installer on Ubuntu image (adding Java etc.), and use this location (/usr/local/eXist-db/...) for the volume mount, and it works well:
I'm using kubernetes yaml to deploy it, and it mounted well.
...
volumeMounts:
- name: azurefile
mountPath: /usr/local/eXist-db/Myfiles
...
But I prefare the exist default image, and it not Ubuntu , it JavaVM, so where the location to mount the volume? or there is other best practice to do it?
Thanks!
Assuming that you are talking about exist-db versions 5.0.0 and up, mounting your local directory from /usr/local/eXist-db/Myfiles
to the internal path exist/data
will do what you want.
Note that you cannot simply mount a binary incompatible data directory, like one generate by exist-db version 4.x.x into a 5.x.x instance. For that you need to do a backup-restore.
Volumes just work the usual docker way, nothing special about it not being ubuntu/alpine/pick-your-base.
see the official readme for more tips and tricks.