Update the logrotate config to use the right permissions for the file, and to call USR1 on nginx after rotation. Update the readme to use the nginx pidfile.
This commit is contained in:
parent
cd1e1ec3b0
commit
f2fef9fcde
2 changed files with 11 additions and 3 deletions
|
@ -43,7 +43,7 @@ STACK=prod python -m workers.webhookworker -D
|
|||
bouncing the servers:
|
||||
|
||||
```
|
||||
sudo kill -HUP <pid of nginx>
|
||||
sudo kill -HUP `cat /mnt/logs/nginx.pid`
|
||||
kill -HUP `cat /mnt/logs/gunicorn.pid`
|
||||
|
||||
kill <pids of worker daemons>
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
missingok
|
||||
notifempty
|
||||
create 644 root root
|
||||
|
||||
postrotate
|
||||
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /mnt/logs/nginx.pid`
|
||||
endscript
|
||||
}
|
||||
|
||||
/mnt/logs/nginx.error.log {
|
||||
|
@ -16,6 +20,10 @@
|
|||
missingok
|
||||
notifempty
|
||||
create 644 root root
|
||||
|
||||
postrotate
|
||||
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /mnt/logs/nginx.pid`
|
||||
endscript
|
||||
}
|
||||
|
||||
/mnt/logs/application.log {
|
||||
|
@ -25,9 +33,9 @@
|
|||
delaycompress
|
||||
missingok
|
||||
notifempty
|
||||
create 644 root root
|
||||
create 644 ubuntu ubuntu
|
||||
|
||||
postrotate
|
||||
kill -USR1 `cat /mnt/logs/gunicorn.pid`
|
||||
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /mnt/logs/gunicorn.pid`
|
||||
endscript
|
||||
}
|
Reference in a new issue