/var/log/nginx/*/*.log {
	missingok
	notifempty
	create 640 http log
	sharedscripts
	compress
	size 100M
	rotate 20
	postrotate
		test ! -r /run/nginx.pid || kill -USR1 `cat /run/nginx.pid`
	endscript
}

# The json files are consumed by promtail so we don't need to keep them around for long
/var/log/nginx/*/*.json {
	missingok
	notifempty
	create 640 http log
	sharedscripts
	compress
	size 10M
	rotate 5
	postrotate
		test ! -r /run/nginx.pid || kill -USR1 `cat /run/nginx.pid`
	endscript
}
