Commit 76329a46a3aca95f918b72936bcd884de4956ff3

Authored by Riyad Preukschas
1 parent eea43c94

Fix settings

config/gitlab.yml.example
... ... @@ -18,10 +18,13 @@ gitlab:
18 18 host: localhost
19 19 port: 80
20 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 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 28 ## Email settings
26 29 # Email address used in the "From" field in mails sent by GitLab
27 30 email_from: gitlab@localhost
... ... @@ -29,9 +32,6 @@ gitlab:
29 32 ## Project settings
30 33 default_projects_limit: 10
31 34  
32   - ## Account used for GitLab installation ('gitlab' if undefined)
33   - user: gitlab
34   -
35 35 ## Gravatar
36 36 gravatar:
37 37 enabled: true # Use user avatar images from Gravatar.com (default: true)
... ... @@ -88,8 +88,9 @@ omniauth:
88 88 # ==========================
89 89  
90 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 95 ## Backup settings
95 96 backup:
... ... @@ -107,10 +108,12 @@ gitolite:
107 108 receive_pack: true
108 109 ssh_user: git
109 110 ssh_host: localhost
110   - group: git # default: 'git' if undefined
111 111 # ssh_port: 22
112 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 117 ## Git settings
115 118 # CAUTION!
116 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 50 Settings.gitlab['protocol'] ||= Settings.gitlab.https ? "https" : "http"
51 51 Settings.gitlab['email_from'] ||= "gitlab@#{Settings.gitlab.host}"
52 52 Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url)
53   -Settings.gitlab['user'] ||= 'gitlab'
  53 +Settings.gitlab['user'] ||= 'gitlab'
54 54  
55 55 Settings['gravatar'] ||= Settingslogic.new({})
56 56 Settings.gravatar['enabled'] ||= true
... ... @@ -68,7 +68,7 @@ Settings.gitolite['upload_pack'] ||= (Settings.gitolite['upload_pack'] != false
68 68 Settings.gitolite['ssh_host'] ||= (Settings.gitlab.host || 'localhost')
69 69 Settings.gitolite['ssh_port'] ||= 22
70 70 Settings.gitolite['ssh_user'] ||= 'git'
71   -Settings.gitolite['group'] ||= 'git'
  71 +Settings.gitolite['owner_group'] ||= Settings.gitolite.ssh_user
72 72 Settings.gitolite['ssh_path_prefix'] ||= Settings.send(:build_gitolite_ssh_path_prefix)
73 73  
74 74 Settings['backup'] ||= Settingslogic.new({})
... ... @@ -81,4 +81,4 @@ Settings.git['bin_path'] ||= '/usr/bin/git'
81 81 Settings.git['timeout'] ||= 10
82 82  
83 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)
... ...