From 55737024db043e299a0de4ba99c5b7987f250315 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 11 Sep 2014 15:48:24 +1000 Subject: [PATCH] FIX: rotate nginx logs daily instead of weekly our default setting kept nginx logs for a year, huge risk on droplets with restricted space --- templates/web.template.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/templates/web.template.yml b/templates/web.template.yml index 7918e95..5016a1a 100644 --- a/templates/web.template.yml +++ b/templates/web.template.yml @@ -169,6 +169,17 @@ run: sv 1 unicorn endscript } + + - replace: + filename: "/etc/logrotate.d/nginx" + from: "weekly" + to: "daily" + + - replace: + filename: "/etc/logrotate.d/nginx" + from: "52" + to: "14" + # move state out of the container this fancy is done to support rapid rebuilds of containers, # we store anacron and logrotate state outside the container to ensure its maintained across builds # later move this snipped into an intialization script -- 2.25.1