From 10b6f88f3b70f7444c2c5260feac9a78fc49673e Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Wed, 3 Aug 2016 16:22:17 +0100 Subject: [PATCH] add logrotate --- Dockerfile | 2 ++ logrotate/sharelatex | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 logrotate/sharelatex diff --git a/Dockerfile b/Dockerfile index dba9ac2066..41aaa7e20c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,8 @@ RUN apt-get update RUN curl -sL https://deb.nodesource.com/setup | sudo bash - RUN apt-get install -y build-essential wget nodejs unzip time imagemagick optipng strace nginx git python zlib1g-dev libpcre3-dev aspell aspell-en aspell-af aspell-am aspell-ar aspell-ar-large aspell-bg aspell-bn aspell-br aspell-ca aspell-cs aspell-cy aspell-da aspell-de aspell-de-alt aspell-el aspell-eo aspell-es aspell-et aspell-eu-es aspell-fa aspell-fo aspell-fr aspell-ga aspell-gl-minimos aspell-gu aspell-he aspell-hi aspell-hr aspell-hsb aspell-hu aspell-hy aspell-id aspell-is aspell-it aspell-kk aspell-kn aspell-ku aspell-lt aspell-lv aspell-ml aspell-mr aspell-nl aspell-no aspell-nr aspell-ns aspell-or aspell-pa aspell-pl aspell-pt-br aspell-ro aspell-ru aspell-sk aspell-sl aspell-ss aspell-st aspell-sv aspell-ta aspell-te aspell-tl aspell-tn aspell-ts aspell-uk aspell-uz aspell-xh aspell-zu +ADD logrotate/sharelatex /etc/logrotate.d/sharelatex + WORKDIR /opt RUN wget https://s3.amazonaws.com/sharelatex-random-files/qpdf-6.0.0.tar.gz && tar xzf qpdf-6.0.0.tar.gz WORKDIR /opt/qpdf-6.0.0 diff --git a/logrotate/sharelatex b/logrotate/sharelatex new file mode 100644 index 0000000000..efc51cc6c9 --- /dev/null +++ b/logrotate/sharelatex @@ -0,0 +1,9 @@ +/var/log/sharelatex/*.log { + daily + missingok + rotate 5 + compress + copytruncate + notifempty + create 644 root adm +} \ No newline at end of file