File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 yum update -y && \
1010 (yum install -y git-core || yum install -y git) && \
1111 yum install -y --enablerepo=osg-upcoming condor && \
12- yum install -y python3-pip httpd mod_auth_openidc mod_ssl python3-mod_wsgi && \
12+ yum install -y python3-pip httpd mod_auth_openidc mod_ssl python3-mod_wsgi logrotate && \
1313 yum install -y make && \
1414 yum clean all && rm -rf /var/cache/yum/*
1515
@@ -28,8 +28,12 @@ RUN pip3 install -U pip && pip3 install -r /opt/registry/requirements.txt
2828# Use our weird grid-security cert/key location
2929RUN rm /etc/httpd/conf.d/ssl.conf
3030
31+ # Setup cron job for logrotate to run as root every day
32+ RUN echo "0 0 * * * root /usr/sbin/logrotate /etc/logrotate.d/httpd >> /var/log/cron 2>&1" > /etc/cron.d/logrotate-httpd
33+
3134COPY register.py /usr/bin
3235COPY supervisor-apache.conf /etc/supervisord.d/40-apache.conf
36+ COPY logrotate-http.conf /etc/logrotate.d/httpd
3337COPY examples/apache.conf /etc/httpd/conf.d/
3438
3539ENV CONFIG_DIR=/srv
Original file line number Diff line number Diff line change 1+ /var/log/httpd/*.log {
2+ maxsize 100M
3+ rotate 20
4+ missingok
5+ notifempty
6+ compress
7+ delaycompress
8+ sharedscripts
9+ postrotate
10+ PID=$(pgrep -o httpd); if [ "$PID" ]; then kill -USR1 $PID; fi
11+ endscript
12+ }
You can’t perform that action at this time.
0 commit comments