docker-compose seafile 12.0.11 部署失败

  • 按照教程进行下载的配置文件,然后启动的,但是启动报错了,seafile没有启动起来
*** Running /etc/my_init.d/01_create_data_links.sh...
*** Booting runit daemon...
*** Runit started as PID 21
*** Running /scripts/enterpoint.sh...
2025-04-02 08:44:29 Nginx ready 
2025-04-02 08:44:29 This is an idle script (infinite loop) to keep container running. 
[2025-04-02 08:44:29] Skip running setup-seafile-mysql.py because there is existing seafile-data folder.
[04/02/2025 08:44:29][upgrade]: The container was recreated, start fix the media symlinks
mv: not replacing '/shared/seafile/seahub-data/avatars/default-non-register.jpg'
mv: not replacing '/shared/seafile/seahub-data/avatars/default.png'
mv: not replacing '/shared/seafile/seahub-data/avatars/groups'
[04/02/2025 08:44:29][upgrade]: Done

Error: the user running the script ("root") is not the owner of "/shared/seafile/seafile-data" folder, you should use the user "ubuntu" to run the script.
Traceback (most recent call last):
  File "/scripts/start.py", line 94, in <module>
    main()
  File "/scripts/start.py", line 79, in main
    call('{} start'.format(get_script('seafile.sh')))
  File "/scripts/utils.py", line 70, in call
    return subprocess.check_call(*a, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/opt/seafile/seafile-server-12.0.11/seafile.sh start' returned non-zero exit status 255.
#env
COMPOSE_FILE='seafile-server.yml,caddy.yml,seadoc.yml'
COMPOSE_PATH_SEPARATOR=','
#NON_ROOT=true

SEAFILE_IMAGE=seafileltd/seafile-mc:12.0-latest
SEAFILE_DB_IMAGE=mariadb:10.11
SEAFILE_MEMCACHED_IMAGE=memcached:1.6.29
SEAFILE_CADDY_IMAGE=lucaslorentz/caddy-docker-proxy:2.9-alpine

SEAFILE_VOLUME=/data/seafile
SEAFILE_MYSQL_VOLUME=/data/seafile-mysql/db
SEAFILE_CADDY_VOLUME=/data/seafile-caddy

SEAFILE_MYSQL_DB_HOST=db
INIT_SEAFILE_MYSQL_ROOT_PASSWORD="***"
SEAFILE_MYSQL_DB_USER=seafile
SEAFILE_MYSQL_DB_PASSWORD="***"

TIME_ZONE=Asia/Shanghai

JWT_PRIVATE_KEY=pCTAs3HNZI9GDwZ1guugSiOrCItXPijlbS278eYT

SEAFILE_SERVER_HOSTNAME=***
SEAFILE_SERVER_PROTOCOL=http

INIT_SEAFILE_ADMIN_EMAIL=***
INIT_SEAFILE_ADMIN_PASSWORD="***"


SEADOC_IMAGE=seafileltd/sdoc-server:1.0-latest
SEADOC_VOLUME=/data/seafile/seadoc-data

ENABLE_SEADOC=true


NOTIFICATION_SERVER_IMAGE=seafileltd/notification-server:12.0-latest
NOTIFICATION_SERVER_VOLUME=/data/notification-data

检查确认下 /data/seafile 文件夹的权限。错误的提示是:容器执行使用的是 root 账户,但是上面的目标是 ubuntu 用户权限

这个使用的是对应的用户权限,我进容器查看过了,对应的目录变成了ubuntu的权限,是否是要改成root权限

你可以试试 chmod -R 755 /data/seafile