logrotate copytruncate

This commit is contained in:
bunkerity
2020-10-27 21:33:05 +01:00
parent 1d63838ee6
commit 2f68667893
7 changed files with 19 additions and 6 deletions

View File

@@ -18,7 +18,9 @@ RUN apk --no-cache add certbot libstdc++ libmaxminddb geoip pcre yajl fail2ban c
mkdir /opt/entrypoint.d && \
rm -f /var/log/nginx/* && \
chown root:nginx /var/log/nginx && \
chmod 770 /var/log/nginx
chmod 750 /var/log/nginx && \
touch /var/log/nginx/error.log /var/log/nginx/modsec_audit.log && \
chown nginx:nginx /var/log/nginx/*.log
VOLUME /www /http-confs /server-confs /modsec-confs /modsec-crs-confs