Hello,
I’ve got a problem updating an old seafile-pro docker (version 6.3) to the actual version 8. This is the docker-compose.yaml I’m using right now and it works fine with this 6.3 image
version: '2'
networks:
seafile-net:
name: seafile-net
services:
db:
image: mariadb:10.5
container_name: seafile-mysql
restart: "no"
environment:
- MYSQL_ROOT_PASSWORD=SOMEPASSWORD
- MYSQL_LOG_CONSOLE=true
volumes:
- /mnt/storage/seafile/mysql/db:/var/lib/mysql
networks:
- seafile-net
memcached:
image: memcached:1.5.6
container_name: seafile-memcached
restart: "no"
entrypoint: memcached -m 256
networks:
- seafile-net
#### just for seafile-pro:
elasticsearch:
image: seafileltd/elasticsearch-with-ik:5.6.16
container_name: seafile-elasticsearch
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 2g
volumes:
- /mnt/storage/seafile/elasticsearch/data:/usr/share/elasticsearch/data
networks:
- seafile-net
#### just for seafile-pro EOM
seafile:
image: docker.seadrive.org/seafileltd/seafile-pro:latest
container_name: seafile
restart: "no"
expose:
- "80"
- "8000" #webUI
- "8082" #Sync with app
- "8080" #webdav
volumes:
- /mnt/storage/seafile/shared:/shared
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=SOMEPASSWORD
- TIME_ZONE=Europe/Berlin
- SEAFILE_ADMIN_PASSWORD=SOMEPASSWORD
- SEAFILE_SERVER_HOSTNAME=MYHOSTNAME
depends_on:
- db
- memcached
- elasticsearch
networks:
- seafile-net
If I try to follow the upgrade guide Upgrade Seafile Docker Professional Edition to 7.0 - Seafile Admin Manual it won’t work. If I use the latest image of the newest seafile version
the seafile docker container logs the following error on startup:
[root@serv1 seafile]# docker logs -f seafile
*** Running /etc/my_init.d/01_create_data_links.sh...
*** Booting runit daemon...
*** Runit started as PID 27
*** Running /scripts/enterpoint.sh...
2021-12-15 20:53:37 Nginx ready
2021-12-15 20:53:37 This is a idle script (infinite loop) to keep container running.
[12/15/2021 20:53:37][upgrade]: Running script /opt/seafile/seafile-pro-server-8.0.14/upgrade/upgrade_6.3_7.0.sh
-------------------------------------------------------------
This script would upgrade your seafile server from 6.3 to 7.0
Press [ENTER] to contiune
-------------------------------------------------------------
Can't find a python executable of version 2.7 or above in PATH
Install python 2.7+ before continue.
Or if you installed it in a non-standard PATH, set the PYTHON enviroment varirable to it
[2021-12-15 20:53:37] Skip running setup-seafile-mysql.py because there is existing seafile-data folder.
[2021-12-15 20:53:37] Running scripts /opt/seafile/seafile-pro-server-8.0.14/upgrade/upgrade_6.3_7.0.sh
Traceback (most recent call last):
File "/scripts/start.py", line 86, in <module>
main()
File "/scripts/start.py", line 58, in main
check_upgrade()
File "/scripts/upgrade.py", line 182, in check_upgrade
run_script_and_update_version_stamp(script, new_version)
File "/scripts/upgrade.py", line 61, in run_script_and_update_version_stamp
call(script)
File "/scripts/utils.py", line 70, in call
return subprocess.check_call(*a, **kw)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/opt/seafile/seafile-pro-server-8.0.14/upgrade/upgrade_6.3_7.0.sh' returned non-zero exit status 1.
I switched into the running docker container and modified the upgrade_6.3_7.0.sh script to use python 3. If I do that it runs a little bit further but still complains:
root@38914d982cdd:/opt/seafile# /opt/seafile/seafile-pro-server-8.0.14/upgrade/upgrade_6.3_7.0.sh
-------------------------------------------------------------
This script would upgrade your seafile server from 6.3 to 7.0
Press [ENTER] to contiune
-------------------------------------------------------------
Updating seafile/seahub database ...
[INFO] You are using MySQL
[INFO] updating ccnet database...
[ERROR] Failed to connect to mysql database ccnet_db: Access denied for user 'seafile'@'%.%.%.%' to database 'ccnet_db'
Failed to upgrade your database
It seems like it searches for a ccnet database because it thinks I use MySQL, but as you can see in my docker-compose.yaml I use MariaDB instead. Can anyone help me to understand how to update my seafile docker deployment to the actual version. Is there a special update script to use with MariaDB?
Thanks a lot in advance for your help!
Best regards,
Tobias