Commit d378332ff9d05d1ab3d7661a4fbea99188225d8f

Authored by Jacob Vosmaer
1 parent 253850dd

Add logrotate setup to the installation guide

doc/install/installation.md
@@ -52,7 +52,7 @@ If you are not familiar with vim please skip this and keep using the default edi @@ -52,7 +52,7 @@ If you are not familiar with vim please skip this and keep using the default edi
52 52
53 Install the required packages: 53 Install the required packages:
54 54
55 - sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl git-core openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev 55 + sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl git-core openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate
56 56
57 Make sure you have the right version of Python installed. 57 Make sure you have the right version of Python installed.
58 58
@@ -265,6 +265,9 @@ Make GitLab start on boot: @@ -265,6 +265,9 @@ Make GitLab start on boot:
265 265
266 sudo update-rc.d gitlab defaults 21 266 sudo update-rc.d gitlab defaults 21
267 267
  268 +## Set up logrotate
  269 +
  270 + sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab
268 271
269 ## Check Application Status 272 ## Check Application Status
270 273
lib/support/logrotate/gitlab 0 → 100644
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
  1 +# GitLab logrotate settings
  2 +# based on: http://stackoverflow.com/a/4883967
  3 +
  4 +/home/git/gitlab/log/*.log {
  5 + weekly
  6 + missingok
  7 + rotate 52
  8 + compress
  9 + delaycompress
  10 + notifempty
  11 + copytruncate
  12 +}
  13 +
  14 +/home/git/gitlab-shell/gitlab-shell.log {
  15 + weekly
  16 + missingok
  17 + rotate 52
  18 + compress
  19 + delaycompress
  20 + notifempty
  21 + copytruncate
  22 +}