Enable log rotation for apache

Change-Id: I5e143c6907ecfcac3c0bbdb14265d11e1ae3f51c
diff --git a/container-images/apache-git-http-backend/Dockerfile b/container-images/apache-git-http-backend/Dockerfile
index 430224a..26519e8 100644
--- a/container-images/apache-git-http-backend/Dockerfile
+++ b/container-images/apache-git-http-backend/Dockerfile
@@ -6,7 +6,8 @@
       apache2 \
       apache2-ctl \
       apache2-utils \
-      git-daemon && \
+      git-daemon \
+      logrotate && \
     rm /etc/apache2/conf.d/default.conf && \
     rm /etc/apache2/conf.d/info.conf
 
@@ -14,6 +15,7 @@
 COPY config/git-http-backend.conf /etc/apache2/conf.d/
 COPY config/envvars /usr/sbin/envvars
 COPY config/httpd.conf /etc/apache2/httpd.conf
+COPY config/logrotation /etc/logrotate.d/apache2
 
 COPY tools/start /var/tools/start
 COPY tools/create_repo.sh /var/cgi/create_repo.sh
diff --git a/container-images/apache-git-http-backend/config/logrotation b/container-images/apache-git-http-backend/config/logrotation
new file mode 100644
index 0000000..282b1e8
--- /dev/null
+++ b/container-images/apache-git-http-backend/config/logrotation
@@ -0,0 +1,12 @@
+/var/log/apache2/*log {
+    daily
+    dateext
+    compress
+    delaycompress
+    missingok
+    notifempty
+    sharedscripts
+    postrotate
+        /etc/init.d/apache2 --quiet --ifstarted reload > /dev/null 2>/dev/null || true
+    endscript
+}