Auto-create and chown data dirs on first start

Entrypoint runs as root, ensures /data/{db,uploads,logo} and
/webdav-config exist with UID 1000 ownership, then drops privileges
via gosu. Removes the manual sudo chown step from the README and
makes a fresh docker compose up succeed without prep.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Stefan Hacker
2026-04-16 13:20:02 +02:00
parent d476784c06
commit 20e61aa61c
4 changed files with 22 additions and 7 deletions
+2 -1
View File
@@ -3,7 +3,8 @@ services:
build: .
container_name: simple-file-upload
restart: unless-stopped
user: "1000:1000"
# No `user:` here — entrypoint.sh starts as root, chowns the bind mounts
# to UID 1000, then drops privileges via gosu before running node.
ports:
- "${APP_PORT:-3500}:3000" # Web (Upload + Admin)
environment: