Commit 6fd13ab041ba1b8df5a856be7f97c3724c7c519e
Exists in
spb-stable
and in
3 other branches
Merge branch 'master' of https://github.com/gitlabhq/gitlabhq
Showing
2 changed files
with
4 additions
and
2 deletions
Show diff stats
config/initializers/1_settings.rb
config/initializers/secret_token.rb
@@ -9,7 +9,9 @@ require 'securerandom' | @@ -9,7 +9,9 @@ require 'securerandom' | ||
9 | 9 | ||
10 | def find_secure_token | 10 | def find_secure_token |
11 | token_file = Rails.root.join('.secret') | 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 | # Use the existing token. | 15 | # Use the existing token. |
14 | File.read(token_file).chomp | 16 | File.read(token_file).chomp |
15 | else | 17 | else |