feat: webdav integration

This patch provides an optional way to integrate an external WebDAV server so that the super-productivity container can serve as a WebDAV server with base url http://localhost/webdav/ . It includes the following changes:

**Replace the default nginx config file**
Besides serving the web app, the new nginx config file also forwards all the requests with paths starting with "/webdav/" to a backend WebDAV server specified by the environment variable WEBDAV_BACKEND. Note that during forwarding, the path prefix "/webdav" will be removed.

**Use hacdias/webdav as default WebDAV backend server**
The docker-compose.yaml provides an example setup to use the docker image [hacdias/webdav](https://github.com/hacdias/webdav) as the WebDAV backend server. An example for the configuration of the WebDAV server is also provided in webdav.yaml.
This commit is contained in:
Kingsley Yung 2024-10-01 16:11:10 +08:00 committed by Johannes Millan
parent 696097141e
commit 14b8d0fd64
5 changed files with 93 additions and 0 deletions

17
docker-compose.yaml Normal file
View file

@ -0,0 +1,17 @@
services:
sp:
image: johannesjo/super-productivity:latest
ports:
- 80:80
environment:
- WEBDAV_BACKEND=http://webdav # Optional
# Optional: WebDAV backend server
# (used with the WEBDAV_BACKEND environment variable)
webdav:
image: hacdias/webdav:latest
ports:
- 81:80
volumes:
- ./webdav.yaml:/config.yml:ro
- ./data:/data