Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make logrotate use the proper user and group. #3219

Merged
merged 3 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docker/rootfs/bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions docker/rootfs/etc/logrotate.d/nginx-proxy-manager
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down