I’m very new to Docker, so I’m probably messing up the permissions here…
Issue
When I try to use a mounted drive as the data directory, after logging in with the default admin details on the web page, I’m sent to a blank “Sorry, but the requested page is unavailable due to a server hiccup” page, and cannot use the server.
Docker Compose
I’m using the default docker-compose.yml (added at the bottom of the post) - with only modifications to the port, passwords and data directory (which is the issue I explain below).
Local Data Directory
If I leave the data volume as /opt/seafile-data, I get a fully functioning instance of Seafile! It’s fast, simple and perfect for my use.
Only I would like my data directory to be stored on my mounted NAS drive.
Mounted Data Directory
When pointing the data volume to my mounted SMB drive in the docker-compose.yml, after deployment I can log into the Seafile interface, but I am presented with a page stating “Sorry, but the requested page is unavailable due to a server hiccup” and cannot use the server.
If I “docker exec -it seafile bash” into the container and type “id -u” and “id -g” they both return 0. So I’m assuming that by mounting my NAS drive in fstab with (uid=0,gid=0) the Seafile Docker container would have access.
When I look in the /media/nas/seafile directory I can see that the installation has created the correct file structure (with logs, nginx and seafile directories). So that got me confused… since it’s clear the container can access the drive.
To make double-sure, back inside the Docker container I navigate to the share data directory and create a test file:
root@1238aeafd074:/shared/seafile/seafile-data# touch testingDATA
Then when I exit the container and navigate back to the mounted drive:
root@nuc:/media/nas/seafile/seafile/seafile-data#
The file “testingDATA” is there!
That’s where my understanding of Docker ends, unfortunately.
Logs
I did check the seafile container log file which might provide further clues to the problem - but I’m not sure if this is a critical issue that’s not resolved or not:
waiting for mysql server to be ready: %s (2003, "Can't connect to MySQL server on 'db' ([Errno 111] Connection refused)")
waiting for mysql server to be ready: %s (2003, "Can't connect to MySQL server on 'db' ([Errno 111] Connection refused)")
waiting for mysql server to be ready: %s (2003, "Can't connect to MySQL server on 'db' ([Errno 111] Connection refused)")
waiting for mysql server to be ready: %s (2003, "Can't connect to MySQL server on 'db' ([Errno 111] Connection refused)")
waiting for mysql server to be ready: %s (2003, "Can't connect to MySQL server on 'db' ([Errno 111] Connection refused)")
waiting for mysql server to be ready: %s (2003, "Can't connect to MySQL server on 'db' ([Errno 111] Connection refused)")
waiting for mysql server to be ready: %s (2003, "Can't connect to MySQL server on 'db' ([Errno 111] Connection refused)")
[07/09/2020 05:21:24][upgrade]: The container was recreated, running minor-upgrade.sh to fix the media symlinks
[07/09/2020 05:21:24][upgrade]: Running script /opt/seafile/seafile-server-7.1.4/upgrade/minor-upgrade.sh
Any assistance would be massively appreciated!
Thanks,
Chris.
Edit: here’s my fstab and docker-compose.yml in case that helps:
//192. 168.1.21/seafile /media/nas/seafile cifs credentials=/.smbcredentials,uid=0,gid=0,dir_mode=0770,file_mode=0770 0 0
version: ‘2.0’
services:
db:
image: mariadb:10.1
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=******* # Requested, set the root’s password of MySQL service.
- MYSQL_LOG_CONSOLE=true
volumes:
- /opt/seafile-mysql/db:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.
networks:
- seafile-netmemcached: 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: - "7006:80" # - "443:443" # If https is enabled, cancel the comment. volumes: - /media/nas/seafile:/shared # Requested, specifies the path to Seafile data persistent store. environment: - DB_HOST=db - DB_ROOT_PASSWD=********* # Requested, the value shuold be root's password of MySQL service. # - TIME_ZONE=Etc/UTC # Optional, default is UTC. Should be uncomment and set to your local time zone. - SEAFILE_ADMIN_EMAIL=******@******* # Specifies Seafile admin user, default is 'me@example.com'. - SEAFILE_ADMIN_PASSWORD=******* # Specifies Seafile admin password, default is 'asecret'. - SEAFILE_SERVER_LETSENCRYPT=false # Whether to use https or not. - SEAFILE_SERVER_HOSTNAME=*****.******** # Specifies your host name if https is enabled. depends_on: - db - memcached networks: - seafile-net networks: seafile-net: