# run command:
gunicorn -w 4 -b :5000 index:app --access-logfile logs/access.log --error-logfile logs/error.log --log-level=debug --pid run/gunicorn.pid -D

# /etc/logrotate.d/gunicorn

/opt/aliyun_eipaddress/logs/*.log {
daily
rotate 30
compress
dateext
dateformat .%Y-%m-%d
notifempty
sharedscripts
postrotate
    kill -USR1 $(cat /opt/aliyun_eipaddress/run/gunicorn.pid)
endscript
}