Skip to content

Commit 7c55c73

Browse files
committed
Fix confusing situation where install guide told you to install init.d script for puma.
1 parent 6ec73fc commit 7c55c73

File tree

7 files changed

+10
-248
lines changed

7 files changed

+10
-248
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ config/gitlab.yml
1919
config/database.yml
2020
config/initializers/omniauth.rb
2121
config/unicorn.rb
22-
config/puma.rb
2322
config/resque.yml
2423
config/aws.yml
2524
db/data.yml

Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ gem "github-markup", "~> 0.7.4", require: 'github/markup'
7676
# Asciidoc to HTML
7777
gem "asciidoctor"
7878

79-
# Servers
80-
gem "puma", '~> 2.3.1', group: :puma
79+
# Application server
8180
gem "unicorn", '~> 4.6.3', group: :unicorn
8281

8382
# State machine

Gemfile.lock

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,6 @@ GEM
331331
coderay (~> 1.0.5)
332332
method_source (~> 0.8)
333333
slop (~> 3.4)
334-
puma (2.3.1)
335-
rack (>= 1.1, < 2.0)
336334
pygments.rb (0.4.2)
337335
posix-spawn (~> 0.3.6)
338336
yajl-ruby (~> 1.1.0)
@@ -608,7 +606,6 @@ DEPENDENCIES
608606
pg
609607
poltergeist (~> 1.3.0)
610608
pry
611-
puma (~> 2.3.1)
612609
quiet_assets (~> 1.0.1)
613610
rack-mini-profiler
614611
rails (= 3.2.13)

config/puma.rb.example

Lines changed: 0 additions & 93 deletions
This file was deleted.

doc/make_release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Check if any of these changed since last release (~22nd of last month depending
2929
* https://github.com/gitlabhq/gitlabhq/commits/master/lib/support/nginx/gitlab
3030
* https://github.com/gitlabhq/gitlab-shell/commits/master/config.yml.example
3131
* https://github.com/gitlabhq/gitlabhq/commits/master/config/gitlab.yml.example
32-
* https://github.com/gitlabhq/gitlabhq/commits/master/config/puma.rb.example
32+
* https://github.com/gitlabhq/gitlabhq/commits/master/config/unicorn.rb.example
3333
* https://github.com/gitlabhq/gitlabhq/commits/master/config/database.yml.mysql
3434
* https://github.com/gitlabhq/gitlabhq/commits/master/config/database.yml.postgresql
3535

lib/support/init.d/gitlab

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# GITLAB
44
# Maintainer: @randx
5-
# App Version: 5.2
5+
# App Version: 6.0
66

77
### BEGIN INIT INFO
88
# Provides: gitlab
@@ -17,11 +17,10 @@
1717

1818
APP_ROOT="/home/git/gitlab"
1919
APP_USER="git"
20-
DAEMON_OPTS="-C $APP_ROOT/config/puma.rb"
20+
DAEMON_OPTS="-c $APP_ROOT/config/unicorn.rb -E production"
2121
PID_PATH="$APP_ROOT/tmp/pids"
2222
SOCKET_PATH="$APP_ROOT/tmp/sockets"
23-
SOCKET_FILE="$SOCKET_PATH/gitlab.socket"
24-
WEB_SERVER_PID="$PID_PATH/puma.pid"
23+
WEB_SERVER_PID="$PID_PATH/unicorn.pid"
2524
SIDEKIQ_PID="$PID_PATH/sidekiq.pid"
2625
STOP_SIDEKIQ="RAILS_ENV=production bundle exec rake sidekiq:stop"
2726
START_SIDEKIQ="RAILS_ENV=production bundle exec rake sidekiq:start"
@@ -52,8 +51,8 @@ start() {
5251
exit 1
5352
else
5453
if [ `whoami` = root ]; then
55-
! [ -e $SOCKET_FILE ] || execute "rm $SOCKET_FILE"
56-
execute "RAILS_ENV=production bundle exec puma $DAEMON_OPTS"
54+
execute "rm -f $SOCKET_PATH/gitlab.socket"
55+
execute "RAILS_ENV=production bundle exec unicorn_rails $DAEMON_OPTS > /dev/null 2>&1 &"
5756
execute "mkdir -p $PID_PATH && $START_SIDEKIQ > /dev/null 2>&1 &"
5857
echo "$DESC started"
5958
fi
@@ -66,13 +65,12 @@ stop() {
6665
if [ "$PID" -ne 0 -a "$STATUS" -ne 0 ]; then
6766
## Program is running, stop it.
6867
kill -QUIT `cat $WEB_SERVER_PID`
69-
! [ -e $SOCKET_FILE ] || execute "rm $SOCKET_FILE"
7068
execute "mkdir -p $PID_PATH && $STOP_SIDEKIQ > /dev/null 2>&1 &"
7169
rm "$WEB_SERVER_PID" >> /dev/null
7270
echo "$DESC stopped"
7371
else
7472
## Program is not running, exit with error.
75-
echo "Error! $DESC is not started!"
73+
echo "Error! $DESC not started!"
7674
exit 1
7775
fi
7876
}
@@ -83,7 +81,7 @@ restart() {
8381
if [ "$PID" -ne 0 -a "$STATUS" -ne 0 ]; then
8482
echo "Restarting $DESC..."
8583
kill -USR2 `cat $WEB_SERVER_PID`
86-
execute "mkdir -p $PID_PATH && $STOP_SIDEKIQ > /dev/null 2>&1"
84+
execute "mkdir -p $PID_PATH && $STOP_SIDEKIQ > /dev/null 2>&1 &"
8785
if [ `whoami` = root ]; then
8886
execute "mkdir -p $PID_PATH && $START_SIDEKIQ > /dev/null 2>&1 &"
8987
fi
@@ -98,7 +96,7 @@ status() {
9896
cd $APP_ROOT
9997
check_pid
10098
if [ "$PID" -ne 0 -a "$STATUS" -ne 0 ]; then
101-
echo "$DESC / Puma with PID $PID is running."
99+
echo "$DESC / Unicorn with PID $PID is running."
102100
echo "$DESC / Sidekiq with PID $SPID is running."
103101
else
104102
echo "$DESC is not running."

lib/support/init.d/gitlab_unicorn

Lines changed: 0 additions & 138 deletions
This file was deleted.

0 commit comments

Comments
 (0)