Add file upload portal with per-customer links and WebDAV admin access

- Customer upload via token link (no login), optional password + expiry,
  drag & drop for files and folders with preserved structure
- Admin portal with setup wizard, role-based users (admin/staff),
  per-customer WebDAV access rules (read/write), session auth
- WebDAV container (Debian apache2) with htpasswd + access.conf
  auto-generated from the SQLite DB and reloaded via inotifywait
- Configurable public base URL and janitor cron interval in admin UI;
  janitor reconciles the uploads table with the filesystem

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Stefan Hacker
2026-04-16 11:00:51 +02:00
parent 16795137d5
commit 0770259d3d
16 changed files with 1733 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
services:
app:
build: .
container_name: simple-file-upload
restart: unless-stopped
user: "1000:1000"
ports:
- "${APP_PORT:-3500}:3000" # Web (Upload + Admin)
environment:
DB_PATH: /data/db/app.db
UPLOAD_ROOT: /data/uploads
WEBDAV_CONFIG_DIR: /webdav-config
# PUBLIC_BASE_URL can be set via the admin Einstellungen tab instead.
volumes:
- ./data/db:/data/db # SQLite DB liegt hier neben docker-compose.yml
- ./data/uploads:/data/uploads # Kunden-Uploads
- webdav-config:/webdav-config # dynamisch generierte htpasswd + access.conf
webdav:
build: ./webdav
container_name: simple-file-upload-webdav
restart: unless-stopped
ports:
- "${WEBDAV_PORT:-1900}:80" # WebDAV — Login via DB-Benutzer
environment:
WEBDAV_CONFIG_DIR: /webdav-config
volumes:
- ./data/uploads:/data/uploads
- webdav-config:/webdav-config
volumes:
webdav-config: