logrotate copytruncate
This commit is contained in:
parent
1d63838ee6
commit
2f68667893
@ -18,7 +18,9 @@ RUN apk --no-cache add certbot libstdc++ libmaxminddb geoip pcre yajl fail2ban c
|
|||||||
mkdir /opt/entrypoint.d && \
|
mkdir /opt/entrypoint.d && \
|
||||||
rm -f /var/log/nginx/* && \
|
rm -f /var/log/nginx/* && \
|
||||||
chown root:nginx /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
|
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 && \
|
mkdir /opt/entrypoint.d && \
|
||||||
rm -f /var/log/nginx/* && \
|
rm -f /var/log/nginx/* && \
|
||||||
chown root:nginx /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
|
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 && \
|
mkdir /opt/entrypoint.d && \
|
||||||
rm -f /var/log/nginx/* && \
|
rm -f /var/log/nginx/* && \
|
||||||
chown root:nginx /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
|
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 && \
|
mkdir /opt/entrypoint.d && \
|
||||||
rm -f /var/log/nginx/* && \
|
rm -f /var/log/nginx/* && \
|
||||||
chown root:nginx /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
|
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 && \
|
mkdir /opt/entrypoint.d && \
|
||||||
rm -f /var/log/nginx/* && \
|
rm -f /var/log/nginx/* && \
|
||||||
chown root:nginx /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
|
VOLUME /www /http-confs /server-confs /modsec-confs /modsec-crs-confs
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:88888443
|
- 443:8443
|
||||||
volumes:
|
volumes:
|
||||||
- ./web-files:/www
|
- ./web-files:/www
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
|
|||||||
@ -17,4 +17,7 @@
|
|||||||
|
|
||||||
# mininum size of a logfile before rotating
|
# mininum size of a logfile before rotating
|
||||||
minsize %LOGROTATE_MINSIZE%
|
minsize %LOGROTATE_MINSIZE%
|
||||||
|
|
||||||
|
# make a copy and truncate the files
|
||||||
|
copytruncate
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user