Added logrotate configuration file 0.1.3
authorThierry Florac <thierry.florac@onf.fr>
Fri, 02 Jun 2017 16:52:04 +0200
changeset 9 20da2f40949b
parent 8 2025dd476ece
child 10 4feebe67c1db
Added logrotate configuration file
{{cookiecutter.project_slug}}/etc/logrotate.d/gunicorn-{{cookiecutter.project_slug}}.conf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/{{cookiecutter.project_slug}}/etc/logrotate.d/gunicorn-{{cookiecutter.project_slug}}.conf	Fri Jun 02 16:52:04 2017 +0200
@@ -0,0 +1,14 @@
+$((INSTALL))/var/log/{{ cookiecutter.project_slug }}.log,
+{{ cookiecutter.logs_directory }}/{{ cookiecutter.webapp_name }}-*.log {
+	weekly
+	missingok
+	rotate 52
+	compress
+	delaycompress
+	notifempty
+	create 644 {{ cookiecutter.run_user }} {{ cookiecutter.run_group }}
+	sharedscripts
+	postrotate
+		systemctl reload gunicorn-{{ cookiecutter.project_slug }}.service
+	endscript
+}