diff --git a/docker/rootfs/bin/common.sh b/docker/rootfs/bin/common.sh index 913dd3e1..13cf06ac 100644 --- a/docker/rootfs/bin/common.sh +++ b/docker/rootfs/bin/common.sh @@ -12,6 +12,10 @@ export CYAN BLUE YELLOW RED RESET PUID=${PUID:-0} PGID=${PGID:-0} +# If changing the username and group name below, +# ensure all references to this user is also changed. +# See docker/rootfs/etc/logrotate.d/nginx-proxy-manager +# and docker/rootfs/etc/nginx/nginx.conf NPMUSER=npm NPMGROUP=npm NPMHOME=/tmp/npmuserhome diff --git a/docker/rootfs/etc/logrotate.d/nginx-proxy-manager b/docker/rootfs/etc/logrotate.d/nginx-proxy-manager index 20c23ac6..275b0aa6 100644 --- a/docker/rootfs/etc/logrotate.d/nginx-proxy-manager +++ b/docker/rootfs/etc/logrotate.d/nginx-proxy-manager @@ -1,5 +1,6 @@ /data/logs/*_access.log /data/logs/*/access.log { - create 0644 root root + su npm npm + create 0644 weekly rotate 4 missingok @@ -12,7 +13,8 @@ } /data/logs/*_error.log /data/logs/*/error.log { - create 0644 root root + su npm npm + create 0644 weekly rotate 10 missingok