summaryrefslogtreecommitdiff
path: root/config/initializers/1_settings.rb
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-31 02:37:45 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-04-19 20:04:31 +0200
commit6cb65c8c344e733902d7193facc71cdc8ce569c7 (patch)
tree9e84d6c47e2104897a8bfe3e8b2b6aecf510d05d /config/initializers/1_settings.rb
parentbb6dcf2d1ab01ecaec92e3144992b62302b007f4 (diff)
downloadgitlab-ce-6cb65c8c344e733902d7193facc71cdc8ce569c7.tar.gz
Make location of gitlab_workhorse_secret configurable
Hard-coding location of configuration files is very bad practice. This patch applies the same approach as currently used for gitlab_shell_secret file.
Diffstat (limited to 'config/initializers/1_settings.rb')
-rw-r--r--config/initializers/1_settings.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 87bf48a3dcd..7a8f00f11b2 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -388,6 +388,12 @@ Settings.gitlab_shell['owner_group'] ||= Settings.gitlab.user
Settings.gitlab_shell['ssh_path_prefix'] ||= Settings.__send__(:build_gitlab_shell_ssh_path_prefix)
#
+# Workhorse
+#
+Settings['workhorse'] ||= Settingslogic.new({})
+Settings.workhorse['secret_file'] ||= Rails.root.join('.gitlab_workhorse_secret')
+
+#
# Repositories
#
Settings['repositories'] ||= Settingslogic.new({})