Merge "Setup logging in the appliance"
This commit is contained in:
commit
881883d70b
|
@ -5,6 +5,7 @@
|
|||
with_items:
|
||||
- python-pip
|
||||
- python-dev
|
||||
- logrotate
|
||||
|
||||
- name: copy akanda-appliance code
|
||||
synchronize: src={{ playbook_dir }}/.. dest=/tmp/akanda-appliance
|
||||
|
@ -18,6 +19,12 @@
|
|||
- name: install akanda-appliance
|
||||
command: python setup.py install chdir=/tmp/akanda-appliance
|
||||
|
||||
- name: install akanda gunicorn logging directory
|
||||
file: path=/var/log/akanda state=directory
|
||||
|
||||
- name: install akanda logrotate config
|
||||
template: src=logrotate.j2 dest=/etc/logrotate.d/akanda
|
||||
|
||||
- name: install gunicorn config file
|
||||
template: src=gunicorn.j2 dest=/etc/akanda_gunicorn_config
|
||||
|
||||
|
|
|
@ -8,4 +8,5 @@ worker_class ="sync"
|
|||
debug = False
|
||||
daemon = True
|
||||
pidfile = "/var/run/gunicorn.pid"
|
||||
errorfile = "/tmp/gunicorn.log"
|
||||
errorlog = "/var/log/akanda/gunicorn_error.log"
|
||||
accesslog = "/var/log/akanda/gunicorn_access.log"
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
/var/log/akanda/*.log {
|
||||
weekly
|
||||
rotate 7
|
||||
compress
|
||||
missingok
|
||||
create 644 root root
|
||||
postrotate
|
||||
kill -USR1 `cat /var/run/gunicorn.pid`
|
||||
endscript
|
||||
}
|
Loading…
Reference in New Issue