11升级12,启动seafile失败

*** Running /etc/my_init.d/01_create_data_links.sh...
*** Booting runit daemon...
*** Runit started as PID 20
*** Running /scripts/enterpoint.sh...
2025-01-12 01:53:35 Nginx ready 
2025-01-12 01:53:35 This is an idle script (infinite loop) to keep container running. 
[2025-01-12 01:53:35] Skip running setup-seafile-mysql.py because there is existing seafile-data folder.
[01/12/2025 01:53:35][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'
[01/12/2025 01:53:35][upgrade]: Done

Error: .env file not found.
Please follow the upgrade manual to set the .env file.

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.7/seafile.sh start' returned non-zero exit status 255.

已下载.env文件并相应修改,放置在docker-compose.yml的同一目录,
以下是.env的配置

COMPOSE_FILE='docker-compose.yml'
COMPOSE_PATH_SEPARATOR=','


SEAFILE_IMAGE=seafileltd/seafile-mc:12.0-latest
SEAFILE_DB_IMAGE=mariadb:10.11
SEAFILE_MEMCACHED_IMAGE=memcached:1.6.18

SEAFILE_VOLUMES=/data/cloudDisk
SEAFILE_MYSQL_VOLUMES=/data/docker/seafile/mysql
SEAFILE_MYSQL_DB_HOST=db
SEAFILE_MYSQL_ROOT_PASSWORD=***
SEAFILE_SSL_PORT=

TIME_ZONE='Asia/Shanghai'

SEAFILE_SERVER_HOSTNAME=***
SEAFILE_SERVER_LETSENCRYPT=false
SEAFILE_FORCE_HTTPS_IN_CONF=false


SEAFILE_ADMIN_EMAIL=***
SEAFILE_ADMIN_PASSWORD=***


seafile 和 数据库的路径不是在一个地方吗?那 .env 和 docker-compose.yml 是不是在 /data 目录下执行的?

您好,.env 文件中缺少 JWT_PRIVATE_KEY 配置项。缺少这个配置 Seafile 服务无法正常启动。

我在.env中添加了一行

JWT_PRIVATE_KEY=g7fTQGBX7uUHLNaLXeAAQLHs9RjzFfMGu2X5HXaA

也行,继续报错

*** Running /etc/my_init.d/01_create_data_links.sh...
*** Booting runit daemon...
*** Runit started as PID 20
*** Running /scripts/enterpoint.sh...
2025-01-13 16:50:07 Nginx ready 
2025-01-13 16:50:07 This is an idle script (infinite loop) to keep container running. 
[2025-01-13 16:50:09] Skip running setup-seafile-mysql.py because there is existing seafile-data folder.
waiting for mysql server to be ready: mysql is not ready
[01/13/2025 16:50:09][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'
[01/13/2025 16:50:09][upgrade]: Done

Error: .env file not found.
Please follow the upgrade manual to set the .env file.

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.7/seafile.sh start' returned non-zero exit status 255.

你的env文件呢?
Error: .env file not found.

.env放在与docker-compose.yml同一目录上

多了个星号吗

检查你的“docker-compose.yml”文件seafile容器环境变量与官方的“seafile-server.yml”有什么不一致的地方。如果一致,再确认环境变量是否都被正确赋值了