Skip to content

Commit 6a37bad

Browse files
committed
Updated default settings to keep 90+ days of logs rotated weekly
1 parent 9f4e635 commit 6a37bad

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Starts with default nginx container and adds in logrotate
44

55
The default settings are:
6-
* Rotate logs as soon as they reach 5M in size
7-
* Keep up to 5 old log files
6+
* Logs are rotated weekly
7+
* Keep up to 13 old log files, for a total of 91 days
88
* Files are compressed
99

1010
Settings should be able to be overwritten by mounting an updated config file to /etc/logrotate.d/nginx

nginx.logrotate

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/var/log/nginx/*.log {
2-
size 5M
2+
weekly
33
missingok
4-
rotate 5
4+
rotate 13 ## 7*13 = 91 days
55
compress
66
delaycompress
77
notifempty

0 commit comments

Comments
 (0)