Commit 29cb573b6ced5cfeca0fc905040ff615e2d76835
1 parent
dbf8ae73
Exists in
master
and in
4 other branches
Added example defaults file and appropriate documentation.
Showing
3 changed files
with
36 additions
and
14 deletions
Show diff stats
doc/install/installation.md
1 | 1 | # Select Version to Install |
2 | 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 | 105 | mail server. By default, Debian is shipped with exim4 whereas Ubuntu |
106 | 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 | 110 | Then select 'Internet Site' and press enter to confirm the hostname. |
111 | 111 | |
... | ... | @@ -253,7 +253,7 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. |
253 | 253 | # PostgreSQL |
254 | 254 | sudo -u git cp config/database.yml.postgresql config/database.yml |
255 | 255 | |
256 | - | |
256 | + | |
257 | 257 | # Make config/database.yml readable to git only |
258 | 258 | sudo -u git -H chmod o-rwx config/database.yml |
259 | 259 | |
... | ... | @@ -281,8 +281,10 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. |
281 | 281 | |
282 | 282 | Download the init script (will be /etc/init.d/gitlab): |
283 | 283 | |
284 | - sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab | |
285 | - sudo chmod +x /etc/init.d/gitlab | |
284 | + sudo ln -s lib/support/init.d/gitlab /etc/init.d/gitlab | |
285 | + sudo cp lib/support/init.d/gitlab /etc/default/gitlab | |
286 | + | |
287 | +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. | |
286 | 288 | |
287 | 289 | Make GitLab start on boot: |
288 | 290 | |
... | ... | @@ -370,7 +372,7 @@ a different host, you can configure its connection string via the |
370 | 372 | # example |
371 | 373 | production: redis://redis.example.tld:6379 |
372 | 374 | |
373 | -If you want to connect the Redis server via socket, then use the "unix:" URL scheme | |
375 | +If you want to connect the Redis server via socket, then use the "unix:" URL scheme | |
374 | 376 | and the path to the Redis socket file in the `config/resque.yml` file. |
375 | 377 | |
376 | 378 | # example |
... | ... | @@ -406,7 +408,7 @@ These steps are fairly general and you will need to figure out the exact details |
406 | 408 | * 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) |
407 | 409 | |
408 | 410 | * Add the gem to your [Gemfile](https://github.com/gitlabhq/gitlabhq/blob/master/Gemfile) |
409 | - `gem "omniauth-your-auth-provider"` | |
411 | + `gem "omniauth-your-auth-provider"` | |
410 | 412 | * If you're using MySQL, install the new Omniauth provider gem by running the following command: |
411 | 413 | `sudo -u git -H bundle install --without development test postgres --path vendor/bundle --no-deployment` |
412 | 414 | ... | ... |
lib/support/init.d/gitlab
... | ... | @@ -15,11 +15,20 @@ |
15 | 15 | # Description: GitLab git repository management |
16 | 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 | 27 | ### Environment variables |
19 | 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 | 32 | app_user="git" |
24 | 33 | app_root="/home/$app_user/gitlab" |
25 | 34 | pid_path="$app_root/tmp/pids" |
... | ... | @@ -27,10 +36,6 @@ socket_path="$app_root/tmp/sockets" |
27 | 36 | web_server_pid_path="$pid_path/unicorn.pid" |
28 | 37 | sidekiq_pid_path="$pid_path/sidekiq.pid" |
29 | 38 | |
30 | - | |
31 | - | |
32 | -### Here ends user configuration ### | |
33 | - | |
34 | 39 | # Read configuration variable file if it is present |
35 | 40 | test -f /etc/default/gitlab && . /etc/default/gitlab |
36 | 41 | |
... | ... | @@ -39,11 +44,12 @@ if [ "$USER" != "$app_user" ]; then |
39 | 44 | sudo -u "$app_user" -H -i $0 "$@"; exit; |
40 | 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 | 48 | if ! cd "$app_root" ; then |
44 | 49 | echo "Failed to cd into $app_root, exiting!"; exit 1 |
45 | 50 | fi |
46 | 51 | |
52 | + | |
47 | 53 | ### Init Script functions |
48 | 54 | |
49 | 55 | ## Gets the pids from the files | ... | ... |
... | ... | @@ -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" | ... | ... |