Commit 3ad6c6124182e3524fb99361110f4e3431849656
Exists in
master
and in
4 other branches
Merge branch 'master' of github.com:gitlabhq/gitlabhq
Showing
3 changed files
with
38 additions
and
13 deletions
Show diff stats
doc/install/installation.md
1 | # Select Version to Install | 1 | # Select Version to Install |
2 | Make sure you view this installation guide from the branch (version) of GitLab you would like to install. In most cases | 2 | Make sure you view this installation guide from the branch (version) of GitLab you would like to install. In most cases |
3 | -this should be the highest numbered stable branch (example shown below). | 3 | +this should be the highest numbered stable branch (example shown below). |
4 | 4 | ||
5 |  | 5 |  |
6 | 6 | ||
@@ -105,7 +105,7 @@ Is the system packaged Git too old? Remove it and compile from source. | @@ -105,7 +105,7 @@ Is the system packaged Git too old? Remove it and compile from source. | ||
105 | mail server. By default, Debian is shipped with exim4 whereas Ubuntu | 105 | mail server. By default, Debian is shipped with exim4 whereas Ubuntu |
106 | does not ship with one. The recommended mail server is postfix and you can install it with: | 106 | does not ship with one. The recommended mail server is postfix and you can install it with: |
107 | 107 | ||
108 | - sudo apt-get install -y postfix | 108 | + sudo apt-get install -y postfix |
109 | 109 | ||
110 | Then select 'Internet Site' and press enter to confirm the hostname. | 110 | Then select 'Internet Site' and press enter to confirm the hostname. |
111 | 111 | ||
@@ -247,7 +247,7 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. | @@ -247,7 +247,7 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. | ||
247 | # PostgreSQL | 247 | # PostgreSQL |
248 | sudo -u git cp config/database.yml.postgresql config/database.yml | 248 | sudo -u git cp config/database.yml.postgresql config/database.yml |
249 | 249 | ||
250 | - | 250 | + |
251 | # Make config/database.yml readable to git only | 251 | # Make config/database.yml readable to git only |
252 | sudo -u git -H chmod o-rwx config/database.yml | 252 | sudo -u git -H chmod o-rwx config/database.yml |
253 | 253 | ||
@@ -276,7 +276,12 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. | @@ -276,7 +276,12 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. | ||
276 | Download the init script (will be /etc/init.d/gitlab): | 276 | Download the init script (will be /etc/init.d/gitlab): |
277 | 277 | ||
278 | sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab | 278 | sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab |
279 | - sudo chmod +x /etc/init.d/gitlab | 279 | + |
280 | +And if you are installing with a non-default folder or user copy and edit the defaults file: | ||
281 | + | ||
282 | + sudo cp lib/support/init.d/gitlab.default.example /etc/default/gitlab | ||
283 | + | ||
284 | +If you installed gitlab in another directory or as a user other than the default you should change these settings in /etc/default/gitlab. Do not edit /etc/init.d/gitlab as it will be changed on upgrade. | ||
280 | 285 | ||
281 | Make GitLab start on boot: | 286 | Make GitLab start on boot: |
282 | 287 | ||
@@ -369,7 +374,7 @@ a different host, you can configure its connection string via the | @@ -369,7 +374,7 @@ a different host, you can configure its connection string via the | ||
369 | # example | 374 | # example |
370 | production: redis://redis.example.tld:6379 | 375 | production: redis://redis.example.tld:6379 |
371 | 376 | ||
372 | -If you want to connect the Redis server via socket, then use the "unix:" URL scheme | 377 | +If you want to connect the Redis server via socket, then use the "unix:" URL scheme |
373 | and the path to the Redis socket file in the `config/resque.yml` file. | 378 | and the path to the Redis socket file in the `config/resque.yml` file. |
374 | 379 | ||
375 | # example | 380 | # example |
@@ -405,7 +410,7 @@ These steps are fairly general and you will need to figure out the exact details | @@ -405,7 +410,7 @@ These steps are fairly general and you will need to figure out the exact details | ||
405 | * Add provider specific configuration options to your `config/gitlab.yml` (you can use the [auth providers section of the example config](https://github.com/gitlabhq/gitlabhq/blob/master/config/gitlab.yml.example) as a reference) | 410 | * Add provider specific configuration options to your `config/gitlab.yml` (you can use the [auth providers section of the example config](https://github.com/gitlabhq/gitlabhq/blob/master/config/gitlab.yml.example) as a reference) |
406 | 411 | ||
407 | * Add the gem to your [Gemfile](https://github.com/gitlabhq/gitlabhq/blob/master/Gemfile) | 412 | * Add the gem to your [Gemfile](https://github.com/gitlabhq/gitlabhq/blob/master/Gemfile) |
408 | - `gem "omniauth-your-auth-provider"` | 413 | + `gem "omniauth-your-auth-provider"` |
409 | * If you're using MySQL, install the new Omniauth provider gem by running the following command: | 414 | * If you're using MySQL, install the new Omniauth provider gem by running the following command: |
410 | `sudo -u git -H bundle install --without development test postgres --path vendor/bundle --no-deployment` | 415 | `sudo -u git -H bundle install --without development test postgres --path vendor/bundle --no-deployment` |
411 | 416 |
lib/support/init.d/gitlab
@@ -15,11 +15,20 @@ | @@ -15,11 +15,20 @@ | ||
15 | # Description: GitLab git repository management | 15 | # Description: GitLab git repository management |
16 | ### END INIT INFO | 16 | ### END INIT INFO |
17 | 17 | ||
18 | + | ||
19 | +### | ||
20 | +# DO NOT EDIT THIS FILE! | ||
21 | +# This file will be overwritten on update. | ||
22 | +# Instead add/change your variables in /etc/default/gitlab | ||
23 | +# An example defaults file can be found in lib/support/default/gitlab | ||
24 | +### | ||
25 | + | ||
26 | + | ||
18 | ### Environment variables | 27 | ### Environment variables |
19 | RAILS_ENV="production" | 28 | RAILS_ENV="production" |
20 | 29 | ||
21 | -# Script variable names should be lower-case not to conflict with internal | ||
22 | -# /bin/sh variables such as PATH, EDITOR or SHELL. | 30 | +# Script variable names should be lower-case not to conflict with |
31 | +# internal /bin/sh variables such as PATH, EDITOR or SHELL. | ||
23 | app_user="git" | 32 | app_user="git" |
24 | app_root="/home/$app_user/gitlab" | 33 | app_root="/home/$app_user/gitlab" |
25 | pid_path="$app_root/tmp/pids" | 34 | pid_path="$app_root/tmp/pids" |
@@ -27,10 +36,6 @@ socket_path="$app_root/tmp/sockets" | @@ -27,10 +36,6 @@ socket_path="$app_root/tmp/sockets" | ||
27 | web_server_pid_path="$pid_path/unicorn.pid" | 36 | web_server_pid_path="$pid_path/unicorn.pid" |
28 | sidekiq_pid_path="$pid_path/sidekiq.pid" | 37 | sidekiq_pid_path="$pid_path/sidekiq.pid" |
29 | 38 | ||
30 | - | ||
31 | - | ||
32 | -### Here ends user configuration ### | ||
33 | - | ||
34 | # Read configuration variable file if it is present | 39 | # Read configuration variable file if it is present |
35 | test -f /etc/default/gitlab && . /etc/default/gitlab | 40 | test -f /etc/default/gitlab && . /etc/default/gitlab |
36 | 41 | ||
@@ -39,11 +44,12 @@ if [ "$USER" != "$app_user" ]; then | @@ -39,11 +44,12 @@ if [ "$USER" != "$app_user" ]; then | ||
39 | sudo -u "$app_user" -H -i $0 "$@"; exit; | 44 | sudo -u "$app_user" -H -i $0 "$@"; exit; |
40 | fi | 45 | fi |
41 | 46 | ||
42 | -# Switch to the gitlab path, if it fails exit with an error. | 47 | +# Switch to the gitlab path, exit on failure. |
43 | if ! cd "$app_root" ; then | 48 | if ! cd "$app_root" ; then |
44 | echo "Failed to cd into $app_root, exiting!"; exit 1 | 49 | echo "Failed to cd into $app_root, exiting!"; exit 1 |
45 | fi | 50 | fi |
46 | 51 | ||
52 | + | ||
47 | ### Init Script functions | 53 | ### Init Script functions |
48 | 54 | ||
49 | ## Gets the pids from the files | 55 | ## Gets the pids from the files |
@@ -0,0 +1,14 @@ | @@ -0,0 +1,14 @@ | ||
1 | +# Copy this lib/support/init.d/gitlab.default.example file to | ||
2 | +# /etc/default/gitlab in order for it to apply to your system. | ||
3 | + | ||
4 | +# RAILS_ENV defines the type of installation that is running. | ||
5 | +# Normal values are "production", "test" and "development". | ||
6 | +RAILS_ENV="production" | ||
7 | + | ||
8 | +# app_user defines the user that GitLab is run as. | ||
9 | +# The default is "git". | ||
10 | +app_user="git" | ||
11 | + | ||
12 | +# app_root defines the folder in which gitlab and it's components are installed. | ||
13 | +# The default is "/home/$app_user/gitlab" | ||
14 | +app_root="/home/$app_user/gitlab" |