Commit d4984e2083487f118801ae28326a80c7b0978a08

Authored by Jacob Vosmaer
1 parent 3f65f14f

Update gitlab-rails templates

files/gitlab-cookbooks/gitlab/templates/default/gitlab.yml.erb
@@ -21,8 +21,6 @@ production: &base @@ -21,8 +21,6 @@ production: &base
21 # 2) In your gitlab.yml file: relative_url_root: /gitlab 21 # 2) In your gitlab.yml file: relative_url_root: /gitlab
22 # 3) In your unicorn.rb: ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab" 22 # 3) In your unicorn.rb: ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
23 # 4) In ../gitlab-shell/config.yml: gitlab_url: "http://127.0.0.1/gitlab" 23 # 4) In ../gitlab-shell/config.yml: gitlab_url: "http://127.0.0.1/gitlab"
24 - # To update the path, run: sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production  
25 - #  
26 # relative_url_root: /gitlab 24 # relative_url_root: /gitlab
27 25
28 # Uncomment and customize if you can't use the default user to run GitLab (default: 'git') 26 # Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
@@ -51,6 +49,10 @@ production: &base @@ -51,6 +49,10 @@ production: &base
51 ## Users management 49 ## Users management
52 # default: false - Account passwords are not sent via the email if signup is enabled. 50 # default: false - Account passwords are not sent via the email if signup is enabled.
53 signup_enabled: <%= @gitlab_signup_enabled %> 51 signup_enabled: <%= @gitlab_signup_enabled %>
  52 + #
  53 + # default: true - If set to false, standard login form won't be shown on the sign-in page
  54 + # signin_enabled: false
  55 +
54 56
55 # Restrict setting visibility levels for non-admin users. 57 # Restrict setting visibility levels for non-admin users.
56 # The default is to allow all levels. 58 # The default is to allow all levels.
@@ -71,6 +73,11 @@ production: &amp;base @@ -71,6 +73,11 @@ production: &amp;base
71 snippets: <%= @gitlab_default_projects_features_snippets %> 73 snippets: <%= @gitlab_default_projects_features_snippets %>
72 visibility_level: "<%= @gitlab_default_projects_features_visibility_level %>" # can be "private" | "internal" | "public" 74 visibility_level: "<%= @gitlab_default_projects_features_visibility_level %>" # can be "private" | "internal" | "public"
73 75
  76 + ## Repository downloads directory
  77 + # When a user clicks e.g. 'Download zip' on a project, a temporary zip file is created in the following directory.
  78 + # The default is 'tmp/repositories' relative to the root of the Rails app.
  79 + # repository_downloads_path: tmp/repositories
  80 +
74 ## External issues trackers 81 ## External issues trackers
75 issues_tracker: 82 issues_tracker:
76 <% if @issues_tracker_redmine %> 83 <% if @issues_tracker_redmine %>
@@ -107,6 +114,7 @@ production: &amp;base @@ -107,6 +114,7 @@ production: &amp;base
107 ## Gravatar 114 ## Gravatar
108 gravatar: 115 gravatar:
109 enabled: <%= @gravatar_enabled %> # Use user avatar image from Gravatar.com (default: true) 116 enabled: <%= @gravatar_enabled %> # Use user avatar image from Gravatar.com (default: true)
  117 + # gravatar urls: possible placeholders: %{hash} %{size} %{email}
110 plain_url: <%= single_quote(@gravatar_plain_url) %> # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm 118 plain_url: <%= single_quote(@gravatar_plain_url) %> # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
111 ssl_url: <%= single_quote(@gravatar_ssl_url) %> # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm 119 ssl_url: <%= single_quote(@gravatar_ssl_url) %> # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
112 120
@@ -155,6 +163,7 @@ production: &amp;base @@ -155,6 +163,7 @@ production: &amp;base
155 # 163 #
156 group_base: <%= single_quote(@ldap_group_base) %> 164 group_base: <%= single_quote(@ldap_group_base) %>
157 165
  166 +
158 ## OmniAuth settings 167 ## OmniAuth settings
159 omniauth: 168 omniauth:
160 # Allow login via Twitter, Google, etc. using OmniAuth providers 169 # Allow login via Twitter, Google, etc. using OmniAuth providers
@@ -173,6 +182,7 @@ production: &amp;base @@ -173,6 +182,7 @@ production: &amp;base
173 # see https://github.com/gitlabhq/gitlab-public-wiki/wiki/Working-custom-omniauth-provider-configurations 182 # see https://github.com/gitlabhq/gitlab-public-wiki/wiki/Working-custom-omniauth-provider-configurations
174 # The 'app_id' and 'app_secret' parameters are always passed as the first two 183 # The 'app_id' and 'app_secret' parameters are always passed as the first two
175 # arguments, followed by optional 'args' which can be either a hash or an array. 184 # arguments, followed by optional 'args' which can be either a hash or an array.
  185 + # Documentation for this is available at http://doc.gitlab.com/ce/integration/omniauth.html
176 providers: 186 providers:
177 # - { name: 'google_oauth2', app_id: 'YOUR APP ID', 187 # - { name: 'google_oauth2', app_id: 'YOUR APP ID',
178 # app_secret: 'YOUR APP SECRET', 188 # app_secret: 'YOUR APP SECRET',
@@ -242,7 +252,7 @@ production: &amp;base @@ -242,7 +252,7 @@ production: &amp;base
242 ## Text under sign-in page (Markdown enabled) 252 ## Text under sign-in page (Markdown enabled)
243 sign_in_text: | 253 sign_in_text: |
244 <% @extra_sign_in_text.to_s.split("\n").each do |line| %> 254 <% @extra_sign_in_text.to_s.split("\n").each do |line| %>
245 - <%= line %> 255 + <%= line %>
246 <% end %> 256 <% end %>
247 <% end %> 257 <% end %>
248 258
@@ -251,6 +261,11 @@ development: @@ -251,6 +261,11 @@ development:
251 261
252 test: 262 test:
253 <<: *base 263 <<: *base
  264 + gravatar:
  265 + enabled: true
  266 + gitlab:
  267 + host: localhost
  268 + port: 80
254 issues_tracker: 269 issues_tracker:
255 redmine: 270 redmine:
256 title: "Redmine" 271 title: "Redmine"
files/gitlab-cookbooks/gitlab/templates/default/rack_attack.rb.erb
@@ -16,7 +16,7 @@ paths_to_be_protected = [ @@ -16,7 +16,7 @@ paths_to_be_protected = [
16 ] 16 ]
17 17
18 unless Rails.env.test? 18 unless Rails.env.test?
19 - Rack::Attack.throttle('protected paths', limit: <%= node['gitlab']['gitlab-rails']['rate_limit_requests_per_period'] %>, period: <%= node['gitlab']['gitlab-rails']['rate_limit_period'] %>.seconds) do |req| 19 + Rack::Attack.throttle('protected paths', limit: <%= @rate_limit_requests_per_period %>, period: <%= @rate_limit_period %>.seconds) do |req|
20 req.ip if paths_to_be_protected.include?(req.path) && req.post? 20 req.ip if paths_to_be_protected.include?(req.path) && req.post?
21 end 21 end
22 end 22 end