Hi,
I am deploying Seafile using docker in a Ubuntu 20.04 DigitalOcean droplet. In that droplet I also have a blockstore volume attached for extra storage, I mounted it at /mnt/shared.
After reading Seafile documentation I expected that if I set:
/opt/seafile-data:/mnt/shared in the docker-compose.yml then Seafile would store all the data outside the docker filesystem, in the server filesystem at /mnt/shared. However Even if everything seems to work perfectly and I can upload files, I don’t see anything under /mnt/shared, the folder is empty. Actually I have no idea of where the data is stored. If I look for example for seafile.log:
root@files:/# locate seafile.log
/var/lib/docker/overlay2/eb6aed715159f5c3cf66b4bcbbb0d739470b0517d684374819e9a872b56d67d9/diff/shared/seafile/logs/seafile.log
/var/lib/docker/overlay2/eb6aed715159f5c3cf66b4bcbbb0d739470b0517d684374819e9a872b56d67d9/merged/shared/seafile/logs/seafile.log
and there is nothing in /opt/seafile-data/
root@files:/opt/seafile-data# ls -a
. ..
I am afraid that this is just me not knowing exactly how docker works. I would also expect the database to be located at /var/lib/mysql but there is nothing there and however there are data/files at /opt/seafile-mysql
Please let me know how can I find out where the files are stored and how would I be able to store the data/files outside the docker instance, in the /mnt/shared folder of the server.
Here is my docker-compose.yml:
version: '2.0'
services:
db:
image: mariadb:10.5
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=[password]
- MYSQL_LOG_CONSOLE=true
volumes:
- /opt/seafile-mysql/db:/var/lib/mysql
networks:
- seafile-net
memcached:
image: memcached:1.5.6
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile-net
seafile:
image: seafileltd/seafile-mc:latest
container_name: seafile
ports:
- "80:80"
- "443:443"
volumes:
- /opt/seafile-data:/mnt/shared
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=[password]
# - TIME_ZONE=Etc/UTC
- SEAFILE_ADMIN_EMAIL=[email]
- SEAFILE_ADMIN_PASSWORD=[password]
- SEAFILE_SERVER_LETSENCRYPT=true
- SEAFILE_SERVER_HOSTNAME=[domain]
depends_on:
- db
- memcached
networks:
- seafile-net
networks:
seafile-net: