04/18 Enhance app (security, performance)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# /etc/logrotate.d/passkeeper
|
||||
#
|
||||
# Install:
|
||||
# sudo cp scripts/passkeeper-logrotate /etc/logrotate.d/passkeeper
|
||||
# sudo logrotate -d /etc/logrotate.d/passkeeper # dry-run to verify
|
||||
# sudo logrotate -f /etc/logrotate.d/passkeeper # force a rotation now
|
||||
#
|
||||
# Rotates Gunicorn access and error logs daily, retaining 30 days.
|
||||
# Sends USR1 to Gunicorn after rotation so it reopens its log file handles
|
||||
# without a full restart (zero downtime).
|
||||
|
||||
/home/spuser/logs/access.log
|
||||
/home/spuser/logs/error.log {
|
||||
daily
|
||||
rotate 30
|
||||
compress
|
||||
delaycompress
|
||||
missingok
|
||||
notifempty
|
||||
create 0640 www-data www-data
|
||||
sharedscripts
|
||||
postrotate
|
||||
# Signal Gunicorn to reopen log files
|
||||
systemctl kill -s USR1 passkeeper.service 2>/dev/null || true
|
||||
endscript
|
||||
}
|
||||
Reference in New Issue
Block a user