Webdav and traefik - how?

Hi,

currently i try to setup seafile as a Docker container behind a traefik reverse proxy. I am using the official image. The Web frontend is accessible, and the Android app connects to the instance, so for now, i try to setup webdav.

I have already figured out that i need to enable it manually in docker_datadir/seafile/conf/seafdav.conf but i have no luck accessing it via dav2fs-mount on debian.

In the config file it has the share_name option, which is set to /. I tried to mount it just with https://seafile.mydomain.tld, with no luck (Error 302). I read something about the /seafdavsuffix, so i tried it was well in the mount command (Error 302).

After that, i tried setting the share_name to /seafdav, and tried to mount it with both / and /seavdav url (both Error 502).

I see that the image brings its own nginx to reverse proxy to seafile’s web server, and that one is just supposed to point traefik to the container’s port 80. But since i needed to manually activate webdav in the config file, maybe i need to do other tweaks?

Has anyone an idea?

Just in case someone is still struggling with this issue, the solution is to add the following lines to your docker-compose file in the label section:

labels:
  - traefik.enable=true
  - traefik.frontend.rule=Host:seafile.${DOMAINNAME}
  - traefik.backend=seafile
  - traefik.port=80   
  - traefik.webdav.frontend.rule=Host:seafile.${DOMAINNAME}
  - traefik.webdav.port=8080
  - traefik.webdav.backend=seafileDav
  - traefik.docker.network=proxy  

here you explicitly define the webdav port to your container running seafile. Furthermore you need to adjust your seafdav.conf to look like this:

[WEBDAV]
enabled = true
port = 8080
fastcgi = true
share_name = /seafdav