Skip to content

Instantly share code, notes, and snippets.

@tkretschmer-rb
Last active December 15, 2015 10:49
Show Gist options
  • Save tkretschmer-rb/5248495 to your computer and use it in GitHub Desktop.
Save tkretschmer-rb/5248495 to your computer and use it in GitHub Desktop.
Instructions on converting GitLab 4.2 from unicorn to puma.
1) Delete the line containing 'unicorn' from Gemfile
2) Add the following line under the "Servers" section
gem "puma", "~> 1.6.3"
3) From /home/gitlab/gitlab run
sudo bundle install --no-deployment
4) From /home/gitlab/gitlab run the install command that fits the database you are using, I use MySQL
sudo -u gitlab -H bundle install --deployment --without development test postgres
5) Create a new file config/puma.rb. Put the following inside it
#!/usr/bin/env puma
#Available options for 1.6.3 can be found here: http://rubydoc.info/gems/puma/1.6.3/Puma/Configuration/DSL
environment = :production
pidfile '/home/gitlab/gitlab/tmp/pids/puma.pid'
state_path '/home/gitlab/gitlab/tmp/pids/puma.state'
bind 'unix:///home/gitlab/gitlab/tmp/sockets/puma.sock'
6) In /etc/nginx/sites-available/gitlab, change the gitlab upstream to
server unix:///home/gitlab/gitlab/tmp/sockets/puma.sock;
7) From /home/gitlab/gitlab run
sudo -u gitlab -H puma -e production -C /home/gitlab/gitlab/config/puma.rb
At this point, you should be able to hit your old GitLab URL in a browser.
Replacing the unicorn management in init.d/gitlab still needs to be done
@nalbion
Copy link

nalbion commented Sep 2, 2013

For GitLab 6.0.0 I had to change step 7 to:

sudo -u git -H bundle exec puma -e production -C /home/git/gitlab/config/puma.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment