Bring the name of the workbench secret token config variable in line.
[arvados.git] / docker / config.rb
index 793a6ff35d6c784d667b6e0239b49624100a0dbc..547a2548abf7918e789a2084a250d2b62382f0c5 100755 (executable)
@@ -15,14 +15,10 @@ config = YAML.load_file('config.yml')
 # substitute a hardcoded string.
 config['OMNIAUTH_APP_SECRET'] = rand(2**512).to_s(36)
 
-# The secret token in services/api/config/initializers/secret_token.rb.
-config['API_SECRET'] = rand(2**256).to_s(36)
-config['WORKER_SECRET'] = rand(2**256).to_s(36)
-
-# Any _PW config settings represent a database password.  If it
-# is blank, choose a password randomly.
+# Any _PW/_SECRET config settings represent passwords/secrets. If they
+# are blank, choose a password randomly.
 config.each_key do |var|
-  if var.end_with?('_PW') && (config[var].nil? || config[var].empty?)
+  if (var.end_with?('_PW') || var.end_with?('_SECRET')) && (config[var].nil? || config[var].empty?)
     config[var] = rand(2**256).to_s(36)
   end
 end