Skip to content

Commit

Permalink
add secret_key_base to build step
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom committed Apr 11, 2024
1 parent 995dab7 commit 7dc0a66
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/tasks/build.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true

require_relative 'rake_helper'
require 'securerandom'

namespace :build do
include RakeHelper
Expand Down Expand Up @@ -36,7 +37,10 @@
end
task a.name.to_sym => depends do |_t|
setup_path = a.path.join('bin', 'setup')
sh "PASSENGER_APP_ENV=#{PASSENGER_APP_ENV} #{setup_path}" if setup_path.exist? && setup_path.executable?
# SECRET_KEY_BASE is actually generated & used elsewhere. However, we have
# to supply it now at build time for turbo.
env = "PASSENGER_APP_ENV=#{PASSENGER_APP_ENV} SECRET_KEY_BASE=#{SecureRandom.uuid}"
sh "#{env} #{setup_path}" if setup_path.exist? && setup_path.executable?
end
end

Expand Down

0 comments on commit 7dc0a66

Please sign in to comment.