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:
+2
-1
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user