summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/gitlab.yml.example7
-rw-r--r--config/initializers/1_settings.rb4
-rw-r--r--config/initializers/devise.rb3
-rw-r--r--config/initializers/secret_token.rb4
-rw-r--r--config/routes.rb2
5 files changed, 13 insertions, 7 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 11df7a5ff15..a266810dc45 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -20,7 +20,7 @@ production: &base
https: false
# Uncomment and customize the last line to run in a non-root path
- # WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this.
+ # WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this.
# Note that four settings need to be changed for this to work.
# 1) In your application.rb file: config.relative_url_root = "/gitlab"
# 2) In your gitlab.yml file: relative_url_root: /gitlab
@@ -69,7 +69,7 @@ production: &base
# If a commit message matches this regular expression, all issues referenced from the matched text will be closed.
# This happens when the commit is pushed or merged into the default branch of a project.
# When not specified the default issue_closing_pattern as specified below will be used.
- # issue_closing_pattern: '([Cc]lose[sd]|[Ff]ixe[sd]) +#\d+'
+ # issue_closing_pattern: '([Cc]lose[sd]|[Ff]ixe[sd]) #(\d+)'
## Default project features settings
default_projects_features:
@@ -107,7 +107,7 @@ production: &base
# ## :project_id - GitLab project identifier
# ## :issues_tracker_id - Project Name or Id in external issue tracker
# new_issue_url: "http://redmine.sample/projects/:issues_tracker_id/issues/new"
- #
+ #
# jira:
# title: "Atlassian Jira"
# project_url: "http://jira.sample/issues/?jql=project=:issues_tracker_id"
@@ -179,6 +179,7 @@ production: &base
# see https://github.com/gitlabhq/gitlab-public-wiki/wiki/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',
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index ce672372a3d..4e8b3f304d0 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -1,5 +1,5 @@
class Settings < Settingslogic
- source "#{Rails.root}/config/gitlab.yml"
+ source ENV.fetch('GITLAB_CONFIG') { "#{Rails.root}/config/gitlab.yml" }
namespace Rails.env
class << self
@@ -90,7 +90,7 @@ Settings.gitlab['signup_enabled'] ||= false
Settings.gitlab['signin_enabled'] ||= true if Settings.gitlab['signin_enabled'].nil?
Settings.gitlab['restricted_visibility_levels'] = Settings.send(:verify_constant_array, Gitlab::VisibilityLevel, Settings.gitlab['restricted_visibility_levels'], [])
Settings.gitlab['username_changing_enabled'] = true if Settings.gitlab['username_changing_enabled'].nil?
-Settings.gitlab['issue_closing_pattern'] = '([Cc]loses|[Ff]ixes) #(\d+)' if Settings.gitlab['issue_closing_pattern'].nil?
+Settings.gitlab['issue_closing_pattern'] = '([Cc]lose[sd]|[Ff]ixe[sd]) #(\d+)' if Settings.gitlab['issue_closing_pattern'].nil?
Settings.gitlab['default_projects_features'] ||= {}
Settings.gitlab.default_projects_features['issues'] = true if Settings.gitlab.default_projects_features['issues'].nil?
Settings.gitlab.default_projects_features['merge_requests'] = true if Settings.gitlab.default_projects_features['merge_requests'].nil?
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 50669ece7a8..d5cb110e881 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -223,6 +223,7 @@ Devise.setup do |config|
method: Gitlab.config.ldap['method'],
bind_dn: Gitlab.config.ldap['bind_dn'],
password: Gitlab.config.ldap['password'],
+ filter: Gitlab.config.ldap['user_filter'],
name_proc: email_stripping_proc
end
@@ -244,4 +245,4 @@ Devise.setup do |config|
config.omniauth provider['name'].to_sym, *provider_arguments
end
-end
+end \ No newline at end of file
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb
index 98400290113..62a54bc8c63 100644
--- a/config/initializers/secret_token.rb
+++ b/config/initializers/secret_token.rb
@@ -9,7 +9,9 @@ require 'securerandom'
def find_secure_token
token_file = Rails.root.join('.secret')
- if File.exist? token_file
+ if ENV.key?('SECRET_KEY_BASE')
+ ENV['SECRET_KEY_BASE']
+ elsif File.exist? token_file
# Use the existing token.
File.read(token_file).chomp
else
diff --git a/config/routes.rb b/config/routes.rb
index 709b66d3e06..f23542cc893 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -327,5 +327,7 @@ Gitlab::Application.routes.draw do
end
end
+ get ':id' => "groups#show", constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/}
+
root to: "dashboard#show"
end