Skip to content

Commit 117d479

Browse files
committed
Merge branch 'master' of github.com:gitlabhq/gitlab-recipes
2 parents d03a83d + c20da67 commit 117d479

File tree

5 files changed

+29
-26
lines changed

5 files changed

+29
-26
lines changed

apache/gitlab

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
ProxyPass / http://127.0.0.1:3000/
1212
ProxyPassReverse / http://127.0.0.1:3000/
13+
ProxyPreserveHost On
1314

1415
CustomLog /var/log/apache2/gitlab/access.log combined
1516
ErrorLog /var/log/apache2/gitlab/error.log
@@ -25,6 +26,7 @@
2526

2627
ProxyPass / http://127.0.0.1:3000/
2728
ProxyPassReverse / http://127.0.0.1:3000/
29+
ProxyPreserveHost On
2830

2931
CustomLog /var/log/apache2/gitlab/access.log combined
3032
ErrorLog /var/log/apache2/gitlab/error.log

init.d/gitlab-centos

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22
#
33
# GitLab
4-
# Maintainer: @elvanja, @troyanov
5-
# App Version: 4.0
4+
# Maintainer: @elvanja, @troyanov, @eiyaya
5+
# App Version: 4.1
66

77
# chkconfig: 2345 82 55
88
# processname: unicorn
9-
# processname: rescue
10-
# description: Runs unicorn and resque for nginx integration.
9+
# processname: sidekiq
10+
# description: Runs unicorn and sidekiq for nginx integration.
1111

1212
# Related (kudos @4sak3n0ne):
1313
# https://github.com/gitlabhq/gitlabhq/issues/1049#issuecomment-8386882
@@ -23,17 +23,17 @@ NAME=gitlab
2323
USER=$NAME
2424
APP_PATH=/home/$USER/gitlab
2525

26-
# The PID and LOCK files used by unicorn and resque
26+
# The PID and LOCK files used by unicorn and sidekiq
2727
UPID=$APP_PATH/tmp/pids/unicorn.pid
2828
ULOCK=/var/lock/subsys/unicorn
29-
RPID=$APP_PATH/tmp/pids/resque_worker.pid
30-
RLOCK=/var/lock/subsys/resque
29+
SPID=$APP_PATH/tmp/pids/sidekiq.pid
30+
SLOCK=/var/lock/subsys/sidekiq
3131

3232
# The options to use when running unicorn
3333
OPTS="-c $APP_PATH/config/unicorn.rb -E production -D"
3434

3535
# Ruby related path update
36-
RUBY_PATH_PATCH="PATH=$PATH:/usr/local/bin:/usr/local/lib && export PATH && "
36+
RUBY_PATH_PATCH="PATH=$PATH:/usr/local/bin:/usr/local/lib:/home/gitlab/bin && export PATH && "
3737

3838
start() {
3939
cd $APP_PATH
@@ -45,14 +45,14 @@ start() {
4545
[ $unicorn -eq 0 ] && touch $ULOCK
4646
echo
4747

48-
# Start resque
49-
echo -n $"Starting resque: "
50-
daemon --pidfile=$RPID --user=$USER "$RUBY_PATH_PATCH ./resque.sh"
51-
resque=$?
52-
[ $resque -eq 0 ] && touch $RLOCK
48+
# Start sidekiq
49+
echo -n $"Starting sidekiq: "
50+
daemon --pidfile=$SPID --user=$USER "$RUBY_PATH_PATCH RAILS_ENV=production bundle exec rake sidekiq:start"
51+
sidekiq=$?
52+
[ $sidekiq -eq 0 ] && touch $SLOCK
5353
echo
5454

55-
retval=$unicorn || $resque
55+
retval=$unicorn || $sidekiq
5656
return $retval
5757
}
5858

@@ -66,14 +66,14 @@ stop() {
6666
[ $unicorn -eq 0 ] && rm -f $ULOCK
6767
echo
6868

69-
# Stop resque
70-
echo -n $"Stopping resque: "
71-
killproc -p $RPID
72-
resque=$?
73-
[ $resque -eq 0 ] && rm -f $RLOCK
69+
# Stop sidekiq
70+
echo -n $"Stopping sidekiq: "
71+
killproc -p $SPID
72+
sidekiq=$?
73+
[ $sidekiq -eq 0 ] && rm -f $SLOCK
7474
echo
7575

76-
retval=$unicorn || $resque
76+
retval=$unicorn || $sidekiq
7777
return $retval
7878
}
7979

@@ -84,7 +84,7 @@ restart() {
8484

8585
get_status() {
8686
status -p $UPID unicorn
87-
status -p $RPID resque
87+
status -p $SPID sidekiq
8888
}
8989

9090
query_status() {
@@ -113,4 +113,4 @@ case "$1" in
113113
;;
114114
esac
115115

116-
exit 0
116+
exit 0

install/CentOS_6.md

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ Just make sure it is started at the next reboot
9494
*logged in as root*
9595

9696
chkconfig redis on
97+
service redis start
9798

9899
## Configure mysql
99100
Make sure it is started at the next reboot and start it immediately so we can configure it.

install/v4/ubuntu_server_1204.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ sudo chown git:git /home/git/.gitolite/hooks/common/post-receive
172172

173173
sudo -u gitlab -H bundle exec rake gitlab:app:setup RAILS_ENV=production
174174

175-
sudo wget https://raw.github.com/gitlabhq/gitlab-recipes/master/init.d/gitlab -P /etc/init.d/
175+
sudo wget https://raw.github.com/gitlabhq/gitlab-recipes/4-0-stable/init.d/gitlab -P /etc/init.d/
176176
sudo chmod +x /etc/init.d/gitlab
177177

178178
sudo update-rc.d gitlab defaults 21
@@ -182,7 +182,7 @@ sudo update-rc.d gitlab defaults 21
182182
#== 7. Nginx
183183
#==
184184
sudo apt-get install -y nginx
185-
sudo wget https://raw.github.com/gitlabhq/gitlab-recipes/master/nginx/gitlab -P /etc/nginx/sites-available/
185+
sudo wget https://raw.github.com/gitlabhq/gitlab-recipes/4-0-stable/nginx/gitlab -P /etc/nginx/sites-available/
186186
sudo ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab
187187

188188

nginx/gitlab

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# GITLAB
22
# Maintainer: @randx
3-
# App Version: 4.0
3+
# App Version: 5.0
44

55
upstream gitlab {
66
server unix:/home/git/gitlab/tmp/sockets/gitlab.socket;
@@ -9,7 +9,7 @@ upstream gitlab {
99
server {
1010
listen YOUR_SERVER_IP:80 default_server; # e.g., listen 192.168.1.1:80;
1111
server_name YOUR_SERVER_FQDN; # e.g., server_name source.example.com;
12-
root /home/gitlab/gitlab/public;
12+
root /home/git/gitlab/public;
1313

1414
# individual nginx logs for this gitlab vhost
1515
access_log /var/log/nginx/gitlab_access.log;

0 commit comments

Comments
 (0)