Docker Webdav Crash

I’m running seafile 11 with docker, and it usually runs great, but it crashes as soon as I volume mount seafdav.conf. The contents of seafdav.conf do not matter. It appears that the container is trying to remove the config to re-create it each time (which fails because of the volume), which feels wrong.

Seafile Server Logs

*** Running /etc/my_init.d/01_create_data_links.sh...
rm: cannot remove '/opt/seafile/conf/seafdav.conf': Device or resource busy
*** Booting runit daemon...
*** Runit started as PID 25
*** Running /scripts/enterpoint.sh...
nginx: [warn] server name "https://seafile.example.xyz" has suspicious symbols in /etc/nginx/sites-enabled/seafile.nginx.conf:5
2024-07-28 16:35:30 Nginx ready 
2024-07-28 16:35:30 This is an idle script (infinite loop) to keep container running. 
nginx: [warn] server name "https://seafile.example.xyz" has suspicious symbols in /etc/nginx/sites-enabled/seafile.nginx.conf:5
[2024-07-28 16:35:34] Skip running setup-seafile-mysql.py because there is existing seafile-data folder.
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/28/2024 16:35:34][upgrade]: The container was recreated, start fix the media symlinks
[07/28/2024 16:35:34][upgrade]: Done

Starting seafile server, please wait ...
Failed to start seafile server
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.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/opt/seafile/seafile-server-11.0.9/seafile.sh start' returned non-zero exit status 1.

Relevant docker-compose.yml

  seafile:
    image: seafileltd/seafile-mc:11.0-latest
    container_name: seafile
    volumes:
      - /opt/docker/data/seafile/shared:/shared
      - ./seafdav.conf:/opt/seafile/conf/seafdav.conf
    environment:
      - DEBUG=True
      - DB_HOST=db
      - DB_ROOT_PASSWD=<nice try>
      - TIME_ZONE=Etc/UTC  # Optional, default is UTC. Should be uncomment and set to your local time zone.
      - SEAFILE_SERVER_HOSTNAME=seafile.example.xyz
    depends_on:
      - db
      - memcached
    networks:
      - seafile-net
      - web
    labels:
      - traefik.enable=true
      - traefik.http.routers.seafile.rule=Host(`seafile.example.xyz`)
      - traefik.http.routers.seafile.tls=true
      - traefik.http.routers.seafile.tls.certresolver=lets-encrypt
      - traefik.http.services.seafile.loadbalancer.server.port=80

I think I found it - after a lot of digging, I realized that /opt/seafile/conf is actually a symlink on runtime to /shared/seafile/conf.

When I volume mount /opt/seafile/conf/seafdav.conf in, it prevents that symlink from being made, which means that another file – /shared/seafile/conf/admin.conf doesn’t exist, which causes start.py to fail.

Can someone update the docs over at WebDAV extension - Seafile Admin Manual say

The configuration file is /shared/seafile/conf/seafdav.conf