summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-04-22 14:37:28 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-04-22 14:37:28 +0200
commit6fd13ab041ba1b8df5a856be7f97c3724c7c519e (patch)
treea01e42a3c25702f341437f3a06848c27258b62fa
parent07deb2254be9b673c57e4af8b86906b79c0382f7 (diff)
parent7e10d01342e500e8bdf10051595020d1bb4bfd0b (diff)
downloadgitlab-ce-6fd13ab041ba1b8df5a856be7f97c3724c7c519e.tar.gz
Merge branch 'master' of https://github.com/gitlabhq/gitlabhq
-rw-r--r--config/initializers/1_settings.rb2
-rw-r--r--config/initializers/secret_token.rb4
2 files changed, 4 insertions, 2 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 59564d9ea33..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
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