mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
logrotate copytruncate
This commit is contained in:
parent
1d63838ee6
commit
2f68667893
7 changed files with 19 additions and 6 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ services:
|
|||
restart: always
|
||||
ports:
|
||||
- 80:8080
|
||||
- 443:88888443
|
||||
- 443:8443
|
||||
volumes:
|
||||
- ./web-files:/www
|
||||
- ./letsencrypt:/etc/letsencrypt
|
||||
|
|
|
@ -17,4 +17,7 @@
|
|||
|
||||
# mininum size of a logfile before rotating
|
||||
minsize %LOGROTATE_MINSIZE%
|
||||
|
||||
# make a copy and truncate the files
|
||||
copytruncate
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue