logrotate copytruncate

This commit is contained in:
bunkerity 2020-10-27 21:33:05 +01:00
parent 1d63838ee6
commit 2f68667893
No known key found for this signature in database
GPG Key ID: 654FFF51CEF7CC47
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

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

View File

@ -25,7 +25,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

View File

@ -25,7 +25,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

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

View File

@ -7,7 +7,7 @@ services:
restart: always
ports:
- 80:8080
- 443:88888443
- 443:8443
volumes:
- ./web-files:/www
- ./letsencrypt:/etc/letsencrypt

View File

@ -17,4 +17,7 @@
# mininum size of a logfile before rotating
minsize %LOGROTATE_MINSIZE%
# make a copy and truncate the files
copytruncate
}