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 21 # 2) In your gitlab.yml file: relative_url_root: /gitlab
22 22 # 3) In your unicorn.rb: ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
23 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 24 # relative_url_root: /gitlab
27 25  
28 26 # Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
... ... @@ -51,6 +49,10 @@ production: &base
51 49 ## Users management
52 50 # default: false - Account passwords are not sent via the email if signup is enabled.
53 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 57 # Restrict setting visibility levels for non-admin users.
56 58 # The default is to allow all levels.
... ... @@ -71,6 +73,11 @@ production: &amp;base
71 73 snippets: <%= @gitlab_default_projects_features_snippets %>
72 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 81 ## External issues trackers
75 82 issues_tracker:
76 83 <% if @issues_tracker_redmine %>
... ... @@ -107,6 +114,7 @@ production: &amp;base
107 114 ## Gravatar
108 115 gravatar:
109 116 enabled: <%= @gravatar_enabled %> # Use user avatar image from Gravatar.com (default: true)
  117 + # gravatar urls: possible placeholders: %{hash} %{size} %{email}
110 118 plain_url: <%= single_quote(@gravatar_plain_url) %> # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
111 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 163 #
156 164 group_base: <%= single_quote(@ldap_group_base) %>
157 165  
  166 +
158 167 ## OmniAuth settings
159 168 omniauth:
160 169 # Allow login via Twitter, Google, etc. using OmniAuth providers
... ... @@ -173,6 +182,7 @@ production: &amp;base
173 182 # see https://github.com/gitlabhq/gitlab-public-wiki/wiki/Working-custom-omniauth-provider-configurations
174 183 # The 'app_id' and 'app_secret' parameters are always passed as the first two
175 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 186 providers:
177 187 # - { name: 'google_oauth2', app_id: 'YOUR APP ID',
178 188 # app_secret: 'YOUR APP SECRET',
... ... @@ -242,7 +252,7 @@ production: &amp;base
242 252 ## Text under sign-in page (Markdown enabled)
243 253 sign_in_text: |
244 254 <% @extra_sign_in_text.to_s.split("\n").each do |line| %>
245   - <%= line %>
  255 + <%= line %>
246 256 <% end %>
247 257 <% end %>
248 258  
... ... @@ -251,6 +261,11 @@ development:
251 261  
252 262 test:
253 263 <<: *base
  264 + gravatar:
  265 + enabled: true
  266 + gitlab:
  267 + host: localhost
  268 + port: 80
254 269 issues_tracker:
255 270 redmine:
256 271 title: "Redmine"
... ...
files/gitlab-cookbooks/gitlab/templates/default/rack_attack.rb.erb
... ... @@ -16,7 +16,7 @@ paths_to_be_protected = [
16 16 ]
17 17  
18 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 20 req.ip if paths_to_be_protected.include?(req.path) && req.post?
21 21 end
22 22 end
... ...