Compare commits

...
Author SHA1 Message Date
Thomas Camlong 457de5750d fix: chown /appdata volume so non-root user can create subdirectories 2026-06-05 14:20:57 +02:00
Thomas 798635e9a8 Merge branch 'dev' into fix-truenas-startup-time 2026-06-05 00:17:42 +02:00
Thomas e293f95573 Remove chown for websocket and tasks files
Removed unnecessary ownership changes for websocket and tasks files.
2026-06-05 00:17:14 +02:00
ajnart a4522132c8 style: auto-fix lint and format 2026-06-04 22:13:47 +00:00
Meier Lukas 91bbc5e2df fix(startup): reduce chown operations during startup for custom user 2025-06-21 12:37:25 +02:00
+10 -1
View File
@@ -9,12 +9,21 @@ echo "Starting with UID='$PUID', GID='$PGID'"
if [ "${PUID}" != "0" ] || [ "${PGID}" != "0" ]; then
# The below command will change the owner of all files in the /app directory (except node_modules) to the new UID and GID
echo "Changing owner to $PUID:$PGID, this will take about 10 seconds..."
find . -name 'node_modules' -prune -o -mindepth 1 -maxdepth 1 -exec chown -R $PUID:$PGID {} +
chown $PUID:$PGID ./run.sh
chown $PUID:$PGID ./apps/cli
chown $PUID:$PGID ./apps/nextjs/server.js
chown $PUID:$PGID ./apps/nextjs/.next
mkdir -p ./apps/nextjs/.next/cache
chown $PUID:$PGID ./apps/nextjs/.next/cache
chown $PUID:$PGID ./db/migrations/sqlite/migrate.cjs
chown $PUID:$PGID ./db/migrations/mysql/migrate.cjs
chown $PUID:$PGID ./build/better_sqlite3.node
chown -R $PUID:$PGID /var/cache/nginx
chown -R $PUID:$PGID /var/log/nginx
chown -R $PUID:$PGID /var/lib/nginx
chown -R $PUID:$PGID /run/nginx/nginx.pid
chown -R $PUID:$PGID /etc/nginx
chown $PUID:$PGID /appdata
echo "Changing owner to $PUID:$PGID, done."
fi