I'm trying to install bluespice wiki and wanted to persist the data outside of the container. https://hub.docker.com/r/bluespice/bluespice-free
To save some space on my host, I wanted to put some data on a S3 storage. As far as I understood the developer of the wiki have all the services directly within the container (Webserver, etc.)
So my idea would be to have the important data (e.g. webserver) on the host and the actually files (pictures, videos, posts) on the S3. Is this something which can be achieved? If so how would I best approach this? Currently I don't understand how I know the correct paths.
my docker-compose file looks like this currently:
services:
bluespice:
container_name: Bluespice-Wiki
image: bluespice/bluespice-free:3.2
command: -H unix:///var/run/docker.sock
restart: always
volumes:
- /mnt/s3fs:/data
This will put all data on the 3s storage and this is really slow and probably also not the smartes move. So my understanding would be to create something like this:
volumes:
- <localshare>:/data/webserver
- <s3share>:/data/www/datafiles
Hope someone understands my problem :)
Here is demonstration for your better understanding:
Once after :
You can use any of the below to know container volumes available:
For example I have mariadb container:
Here you can see
Source:which is actual path on your Host, andDestination:is absolute path inside your container.Now say for example if you wish to store on cloud initially stop your container, mount your external storage on host, move/copy contents in
Source:if any needed.then in volumes you just have to set path, for example
inside your docker-compose.yml
and then
If no volumes available, then just enter your container like below and find out absolute path of the directory which you wanted to persist the data outside of the container.