Commit 6fd13ab041ba1b8df5a856be7f97c3724c7c519e

Authored by Dmitriy Zaporozhets
2 parents 07deb225 7e10d013

Merge branch 'master' of https://github.com/gitlabhq/gitlabhq

config/initializers/1_settings.rb
1 1 class Settings < Settingslogic
2   - source "#{Rails.root}/config/gitlab.yml"
  2 + source ENV.fetch('GITLAB_CONFIG') { "#{Rails.root}/config/gitlab.yml" }
3 3 namespace Rails.env
4 4  
5 5 class << self
... ...
config/initializers/secret_token.rb
... ... @@ -9,7 +9,9 @@ require &#39;securerandom&#39;
9 9  
10 10 def find_secure_token
11 11 token_file = Rails.root.join('.secret')
12   - if File.exist? token_file
  12 + if ENV.key?('SECRET_KEY_BASE')
  13 + ENV['SECRET_KEY_BASE']
  14 + elsif File.exist? token_file
13 15 # Use the existing token.
14 16 File.read(token_file).chomp
15 17 else
... ...