Commit 76329a46a3aca95f918b72936bcd884de4956ff3
1 parent
eea43c94
Exists in
master
and in
4 other branches
Fix settings
Showing
2 changed files
with
14 additions
and
11 deletions
Show diff stats
config/gitlab.yml.example
@@ -18,10 +18,13 @@ gitlab: | @@ -18,10 +18,13 @@ gitlab: | ||
18 | host: localhost | 18 | host: localhost |
19 | port: 80 | 19 | port: 80 |
20 | https: false | 20 | https: false |
21 | - # uncomment and customize to run in non-root path | ||
22 | - # note that ENV['RAILS_RELATIVE_URL_ROOT'] in config/unicorn.rb may need to be changed | 21 | + # Uncomment and customize to run in non-root path |
22 | + # Note that ENV['RAILS_RELATIVE_URL_ROOT'] in config/unicorn.rb may need to be changed | ||
23 | # relative_url_root: /gitlab | 23 | # relative_url_root: /gitlab |
24 | 24 | ||
25 | + # Uncomment and customize if you can't use the default user to run GitLab (default: 'gitlab') | ||
26 | + # user: user123 | ||
27 | + | ||
25 | ## Email settings | 28 | ## Email settings |
26 | # Email address used in the "From" field in mails sent by GitLab | 29 | # Email address used in the "From" field in mails sent by GitLab |
27 | email_from: gitlab@localhost | 30 | email_from: gitlab@localhost |
@@ -29,9 +32,6 @@ gitlab: | @@ -29,9 +32,6 @@ gitlab: | ||
29 | ## Project settings | 32 | ## Project settings |
30 | default_projects_limit: 10 | 33 | default_projects_limit: 10 |
31 | 34 | ||
32 | - ## Account used for GitLab installation ('gitlab' if undefined) | ||
33 | - user: gitlab | ||
34 | - | ||
35 | ## Gravatar | 35 | ## Gravatar |
36 | gravatar: | 36 | gravatar: |
37 | enabled: true # Use user avatar images from Gravatar.com (default: true) | 37 | enabled: true # Use user avatar images from Gravatar.com (default: true) |
@@ -88,8 +88,9 @@ omniauth: | @@ -88,8 +88,9 @@ omniauth: | ||
88 | # ========================== | 88 | # ========================== |
89 | 89 | ||
90 | # GitLab Satellites | 90 | # GitLab Satellites |
91 | -satellites: | ||
92 | - path: /home/gitlab/gitlab-satellites/ | 91 | +satellites: |
92 | + # Relative paths are relative to Rails.root (default: tmp/repo_satellites/) | ||
93 | + path: /home/gitlab/gitlab-satellites/ | ||
93 | 94 | ||
94 | ## Backup settings | 95 | ## Backup settings |
95 | backup: | 96 | backup: |
@@ -107,10 +108,12 @@ gitolite: | @@ -107,10 +108,12 @@ gitolite: | ||
107 | receive_pack: true | 108 | receive_pack: true |
108 | ssh_user: git | 109 | ssh_user: git |
109 | ssh_host: localhost | 110 | ssh_host: localhost |
110 | - group: git # default: 'git' if undefined | ||
111 | # ssh_port: 22 | 111 | # ssh_port: 22 |
112 | # config_file: gitolite.conf | 112 | # config_file: gitolite.conf |
113 | 113 | ||
114 | + # Uncomment and customize if you can't use the default group to own the repositories and run Gitolite (default: same as the 'ssh_user' above) | ||
115 | + # owner_group: group123 | ||
116 | + | ||
114 | ## Git settings | 117 | ## Git settings |
115 | # CAUTION! | 118 | # CAUTION! |
116 | # Use the default values unless you really know what you are doing | 119 | # Use the default values unless you really know what you are doing |
config/initializers/1_settings.rb
@@ -50,7 +50,7 @@ Settings.gitlab['relative_url_root'] ||= '' | @@ -50,7 +50,7 @@ Settings.gitlab['relative_url_root'] ||= '' | ||
50 | Settings.gitlab['protocol'] ||= Settings.gitlab.https ? "https" : "http" | 50 | Settings.gitlab['protocol'] ||= Settings.gitlab.https ? "https" : "http" |
51 | Settings.gitlab['email_from'] ||= "gitlab@#{Settings.gitlab.host}" | 51 | Settings.gitlab['email_from'] ||= "gitlab@#{Settings.gitlab.host}" |
52 | Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url) | 52 | Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url) |
53 | -Settings.gitlab['user'] ||= 'gitlab' | 53 | +Settings.gitlab['user'] ||= 'gitlab' |
54 | 54 | ||
55 | Settings['gravatar'] ||= Settingslogic.new({}) | 55 | Settings['gravatar'] ||= Settingslogic.new({}) |
56 | Settings.gravatar['enabled'] ||= true | 56 | Settings.gravatar['enabled'] ||= true |
@@ -68,7 +68,7 @@ Settings.gitolite['upload_pack'] ||= (Settings.gitolite['upload_pack'] != false | @@ -68,7 +68,7 @@ Settings.gitolite['upload_pack'] ||= (Settings.gitolite['upload_pack'] != false | ||
68 | Settings.gitolite['ssh_host'] ||= (Settings.gitlab.host || 'localhost') | 68 | Settings.gitolite['ssh_host'] ||= (Settings.gitlab.host || 'localhost') |
69 | Settings.gitolite['ssh_port'] ||= 22 | 69 | Settings.gitolite['ssh_port'] ||= 22 |
70 | Settings.gitolite['ssh_user'] ||= 'git' | 70 | Settings.gitolite['ssh_user'] ||= 'git' |
71 | -Settings.gitolite['group'] ||= 'git' | 71 | +Settings.gitolite['owner_group'] ||= Settings.gitolite.ssh_user |
72 | Settings.gitolite['ssh_path_prefix'] ||= Settings.send(:build_gitolite_ssh_path_prefix) | 72 | Settings.gitolite['ssh_path_prefix'] ||= Settings.send(:build_gitolite_ssh_path_prefix) |
73 | 73 | ||
74 | Settings['backup'] ||= Settingslogic.new({}) | 74 | Settings['backup'] ||= Settingslogic.new({}) |
@@ -81,4 +81,4 @@ Settings.git['bin_path'] ||= '/usr/bin/git' | @@ -81,4 +81,4 @@ Settings.git['bin_path'] ||= '/usr/bin/git' | ||
81 | Settings.git['timeout'] ||= 10 | 81 | Settings.git['timeout'] ||= 10 |
82 | 82 | ||
83 | Settings['satellites'] ||= Settingslogic.new({}) | 83 | Settings['satellites'] ||= Settingslogic.new({}) |
84 | -Settings.satellites['path'] ||= Rails.root.join('tmp/repo_satellites/') | 84 | +Settings.satellites['path'] = File.expand_path(Settings.satellites['path'] || "tmp/repo_satellites/", Rails.root) |