docker部署11.0升级12.0报错

使用docker部署社区办11.0运行正常,使用.env升级12.0报错无法启动,查看日志发现容器缺少映射.env变量文件,添加之后重启,login页面正常,登录报错internal error,
“Page unavailable”,seahub.log日志报错

2024-12-03 19:49:47,015 [ERROR] django.request:241 log_response Internal Server Error: /accounts/login/
Traceback (most recent call last):
  File "/opt/seafile/seafile-server-12.0.4/seahub/thirdpart/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/seafile/seafile-server-12.0.4/seahub/thirdpart/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/seafile/seafile-server-12.0.4/seahub/thirdpart/django/utils/decorators.py", line 134, in _wrapper_view
    response = view_func(request, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/seafile/seafile-server-12.0.4/seahub/thirdpart/django/views/decorators/cache.py", line 62, in _wrapper_view_func
    response = view_func(request, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/seafile/seafile-server-12.0.4/seahub/seahub/auth/views.py", line 128, in login
    if form.is_valid():
       ^^^^^^^^^^^^^^^
  File "/opt/seafile/seafile-server-12.0.4/seahub/thirdpart/django/forms/forms.py", line 201, in is_valid
    return self.is_bound and not self.errors
                                 ^^^^^^^^^^^
  File "/opt/seafile/seafile-server-12.0.4/seahub/thirdpart/django/forms/forms.py", line 196, in errors
    self.full_clean()
  File "/opt/seafile/seafile-server-12.0.4/seahub/thirdpart/django/forms/forms.py", line 434, in full_clean
    self._clean_form()
  File "/opt/seafile/seafile-server-12.0.4/seahub/thirdpart/django/forms/forms.py", line 455, in _clean_form
    cleaned_data = self.clean()
                   ^^^^^^^^^^^^
  File "/opt/seafile/seafile-server-12.0.4/seahub/seahub/auth/forms.py", line 64, in clean
    user = User.objects.get(email=email)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/seafile/seafile-server-12.0.4/seahub/seahub/base/accounts.py", line 281, in get
    emailuser = ccnet_threaded_rpc.get_emailuser(email)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/seafile/seafile-server-12.0.4/seafile/lib/python3/site-packages/pysearpc/client.py", line 127, in newfunc
    return fret(ret_str)
           ^^^^^^^^^^^^^
  File "/opt/seafile/seafile-server-12.0.4/seafile/lib/python3/site-packages/pysearpc/client.py", line 65, in _fret_obj
    raise SearpcError(dicts['err_msg'])
pysearpc.common.SearpcError: Database error

seafile.log报错日志

[2024-12-03 19:48:44] [WARNING] ../common/seaf-db.c(928): Failed to prepare sql SELECT e.id, e.email, is_staff, is_active, ctime, passwd, reference_id, role  FROM EmailUser e LEFT JOIN UserRole ON e.email = UserRole.email  WHERE e.email=?: No database selected
[2024-12-03 19:49:46] [INFO] start to serve on pipe client
[2024-12-03 19:49:46] [WARNING] ../common/seaf-db.c(928): Failed to prepare sql SELECT e.id, e.email, is_staff, is_active, ctime, passwd, reference_id, role  FROM EmailUser e LEFT JOIN UserRole ON e.email = UserRole.email  WHERE e.email=?: No database selected

附上,麻烦问问是哪块升级方式还有问题

从日志上看,是数据库连接有问题,您检查下.env中数据库配置是否和原seafile 11.0中一致
image