From 6536aa4c2a0917eea9f3ab8b8554bd399719d957 Mon Sep 17 00:00:00 2001 From: Leopere Date: Tue, 24 Feb 2026 16:37:16 -0500 Subject: [PATCH] WebDAV: share at /dav for Finder mount, healthcheck on /dav/ - Mount provider at /dav so PROPFIND returns 207 + XML (root / was 200 empty) - Connect in Finder to https://macmini.nixc.us/dav (genghis/genghis) - Healthcheck hits /dav/ so readiness matches the share path Co-authored-by: Cursor --- docker-compose-macmini.yml | 9 +++------ webdav/app.py | 4 +++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docker-compose-macmini.yml b/docker-compose-macmini.yml index 9258826..6790d12 100644 --- a/docker-compose-macmini.yml +++ b/docker-compose-macmini.yml @@ -1,6 +1,9 @@ # Macmini WebDAV stack — exposes https://macmini.nixc.us (auth at tunnel, not in Python). # Server (ingress) is assumed configured for this domain and key. # +# Connect in Finder: Go → Connect to Server → https://macmini.nixc.us/dav (user genghis, pass genghis). +# Root path / returns empty PROPFIND; the share is at /dav so Finder can mount it. +# # What works: # - WebDAV: no auth in app; uploads go to ~/dev/piconfigurator/bin. Rebuild after app changes: --build. # - Tunnel: uses ~/.ssh/ca-userkey (same key as all other tunnel clients). @@ -11,12 +14,6 @@ services: webdav: build: ./webdav restart: always - healthcheck: - test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:80/')"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 10s volumes: - ${HOME}/dev/piconfigurator/bin:/data diff --git a/webdav/app.py b/webdav/app.py index 6f09320..d80b9d0 100644 --- a/webdav/app.py +++ b/webdav/app.py @@ -45,7 +45,8 @@ ensure_data_dir_writable() config = { "host": "0.0.0.0", "port": PORT, - "provider_mapping": {"/": FilesystemProvider(ROOT, readonly=False)}, + # Mount at /dav so root / is not special-cased (Finder PROPFIND needs real XML) + "provider_mapping": {"/dav": FilesystemProvider(ROOT, readonly=False)}, "middleware_stack": [ Cors, ErrorPrinter, @@ -67,6 +68,7 @@ config = { "treat_root_options_as_asterisk": True, }, "add_header_MS_Author_Via": True, + "property_manager": True, # Required for PROPFIND to return XML (Finder mount) "verbose": 3, }