From d4984e2083487f118801ae28326a80c7b0978a08 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 21 May 2014 15:42:58 +0200 Subject: [PATCH] Update gitlab-rails templates --- files/gitlab-cookbooks/gitlab/templates/default/gitlab.yml.erb | 21 ++++++++++++++++++--- files/gitlab-cookbooks/gitlab/templates/default/rack_attack.rb.erb | 2 +- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/files/gitlab-cookbooks/gitlab/templates/default/gitlab.yml.erb b/files/gitlab-cookbooks/gitlab/templates/default/gitlab.yml.erb index 44b61e3..e0033af 100644 --- a/files/gitlab-cookbooks/gitlab/templates/default/gitlab.yml.erb +++ b/files/gitlab-cookbooks/gitlab/templates/default/gitlab.yml.erb @@ -21,8 +21,6 @@ production: &base # 2) In your gitlab.yml file: relative_url_root: /gitlab # 3) In your unicorn.rb: ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab" # 4) In ../gitlab-shell/config.yml: gitlab_url: "http://127.0.0.1/gitlab" - # To update the path, run: sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production - # # relative_url_root: /gitlab # Uncomment and customize if you can't use the default user to run GitLab (default: 'git') @@ -51,6 +49,10 @@ production: &base ## Users management # default: false - Account passwords are not sent via the email if signup is enabled. signup_enabled: <%= @gitlab_signup_enabled %> + # + # default: true - If set to false, standard login form won't be shown on the sign-in page + # signin_enabled: false + # Restrict setting visibility levels for non-admin users. # The default is to allow all levels. @@ -71,6 +73,11 @@ production: &base snippets: <%= @gitlab_default_projects_features_snippets %> visibility_level: "<%= @gitlab_default_projects_features_visibility_level %>" # can be "private" | "internal" | "public" + ## Repository downloads directory + # When a user clicks e.g. 'Download zip' on a project, a temporary zip file is created in the following directory. + # The default is 'tmp/repositories' relative to the root of the Rails app. + # repository_downloads_path: tmp/repositories + ## External issues trackers issues_tracker: <% if @issues_tracker_redmine %> @@ -107,6 +114,7 @@ production: &base ## Gravatar gravatar: enabled: <%= @gravatar_enabled %> # Use user avatar image from Gravatar.com (default: true) + # gravatar urls: possible placeholders: %{hash} %{size} %{email} plain_url: <%= single_quote(@gravatar_plain_url) %> # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm ssl_url: <%= single_quote(@gravatar_ssl_url) %> # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm @@ -155,6 +163,7 @@ production: &base # group_base: <%= single_quote(@ldap_group_base) %> + ## OmniAuth settings omniauth: # Allow login via Twitter, Google, etc. using OmniAuth providers @@ -173,6 +182,7 @@ production: &base # see https://github.com/gitlabhq/gitlab-public-wiki/wiki/Working-custom-omniauth-provider-configurations # The 'app_id' and 'app_secret' parameters are always passed as the first two # arguments, followed by optional 'args' which can be either a hash or an array. + # Documentation for this is available at http://doc.gitlab.com/ce/integration/omniauth.html providers: # - { name: 'google_oauth2', app_id: 'YOUR APP ID', # app_secret: 'YOUR APP SECRET', @@ -242,7 +252,7 @@ production: &base ## Text under sign-in page (Markdown enabled) sign_in_text: | <% @extra_sign_in_text.to_s.split("\n").each do |line| %> - <%= line %> + <%= line %> <% end %> <% end %> @@ -251,6 +261,11 @@ development: test: <<: *base + gravatar: + enabled: true + gitlab: + host: localhost + port: 80 issues_tracker: redmine: title: "Redmine" diff --git a/files/gitlab-cookbooks/gitlab/templates/default/rack_attack.rb.erb b/files/gitlab-cookbooks/gitlab/templates/default/rack_attack.rb.erb index ade64d8..3e17bb8 100644 --- a/files/gitlab-cookbooks/gitlab/templates/default/rack_attack.rb.erb +++ b/files/gitlab-cookbooks/gitlab/templates/default/rack_attack.rb.erb @@ -16,7 +16,7 @@ paths_to_be_protected = [ ] unless Rails.env.test? - 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| + Rack::Attack.throttle('protected paths', limit: <%= @rate_limit_requests_per_period %>, period: <%= @rate_limit_period %>.seconds) do |req| req.ip if paths_to_be_protected.include?(req.path) && req.post? end end -- libgit2 0.21.2