diff --git a/apache/gitlab_passenger b/apache/gitlab_passenger new file mode 100644 index 0000000..48fc66c --- /dev/null +++ b/apache/gitlab_passenger @@ -0,0 +1,40 @@ +# This site only works with mod_passenger 4.0x (use RVM or similar) +# +# In order for gitlab (5.2) to run with mod_passenger you only need to +# make sure that, sidekiq is running (see upstart script in init folder). +# mod_passenger will start gitlab more or less automatically. +# +# Documentation of mod_passenger: +# See: http://www.modrails.com/documentation/Users%20guide%20Apache.html + +# Remove if you don't want to use SSL + + + # Change to 80 if you want to access the site over HTTP + + ServerAdmin root@localhost + + ServerName git.example.com + # Mod_passenger needs to access the path + DocumentRoot /home/git/gitlab/public + + Allow from all + Options -MultiViews + + + # SSL, remove if you don't use SSL + SSLEngine on + SSLCertificateFile /etc/ssl/private/private.pem + SSLCertificateKeyFile /etc/ssl/private/private.pem + SSLCertificateChainFile /etc/ssl/private/private.pem + + # Logging + ErrorLog /var/log/apache2/git.example.com_error.log + LogLevel warn + CustomLog /var/log/apache2/git.example.com_access.log combined + + # Custom environment setup with RVM + SetEnv PATH /usr/local/rvm/gems/ruby-1.9.3-p429@gitlab/bin:/usr/local/rvm/gems/ruby-1.9.3-p429/bin:/usr/local/rvm/gems/ruby-1.9.3-p429@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p429/bin:/usr/local/rvm/bin:/usr/bin:/bin + SetEnv GEM_PATH /usr/local/rvm/gems/ruby-1.9.3-p429@gitlab:/usr/local/rvm/gems/ruby-1.9.3-p429@global + + diff --git a/init/gitlab-sidekiq.conf b/init/gitlab-sidekiq.conf new file mode 100644 index 0000000..8cf2f9c --- /dev/null +++ b/init/gitlab-sidekiq.conf @@ -0,0 +1,31 @@ +# /etc/init/gitlab-sidekiq.conf - Sidekiq config for gitlab + +# use the service command: +# sudo service gitlab-sidekiq {start,stop,restart,status} + +description "Sidekiq Background Worker for Gitlab" + +start on runlevel [2345] +stop on runlevel [!2345] + +# change to match your deployment user +setuid git +setgid git + +env HOME=/home/git +env PATH="/usr/local/rvm/gems/ruby-1.9.3-p429@gitlab/bin:/usr/local/rvm/gems/ruby-1.9.3-p429/bin:/usr/local/rvm/gems/ruby-1.9.3-p429@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p429/bin:/usr/local/rvm/bin:/usr/bin:/bin" +env GEM_PATH="/usr/local/rvm/gems/ruby-1.9.3-p429@gitlab:/usr/local/rvm/gems/ruby-1.9.3-p429@global" +env RAILS_ENV="production" +respawn +respawn limit 3 30 + +post-start script + cd /home/git/gitlab + exec bundle exec rake sidekiq:start +end script + + +post-stop script + cd /home/git/gitlab + exec bundle exec rake sidekiq:stop +end script