diff --git a/lib/kamal/cli/proxy.rb b/lib/kamal/cli/proxy.rb index a65caf52..73707572 100644 --- a/lib/kamal/cli/proxy.rb +++ b/lib/kamal/cli/proxy.rb @@ -78,7 +78,7 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base end if run_command - upload! StringIO.new(run_command), KAMAL.config.proxy_run_command_file + upload! StringIO.new(run_command), proxy_boot_config.run_command_file else execute *KAMAL.proxy.reset_run_command, raise_on_non_zero_exit: false end diff --git a/lib/kamal/commands/proxy.rb b/lib/kamal/commands/proxy.rb index b9b255f5..7699dde2 100644 --- a/lib/kamal/commands/proxy.rb +++ b/lib/kamal/commands/proxy.rb @@ -86,7 +86,7 @@ class Kamal::Commands::Proxy < Kamal::Commands::Base end def read_run_command - read_file(config.proxy_run_command_file) + read_file(config.proxy_boot.run_command_file) end def reset_boot_options @@ -102,7 +102,7 @@ class Kamal::Commands::Proxy < Kamal::Commands::Base end def reset_run_command - remove_file config.proxy_run_command_file + remove_file config.proxy_boot.run_command_file end private diff --git a/lib/kamal/configuration/proxy/boot.rb b/lib/kamal/configuration/proxy/boot.rb index 668c0cea..9f8c6f5c 100644 --- a/lib/kamal/configuration/proxy/boot.rb +++ b/lib/kamal/configuration/proxy/boot.rb @@ -66,6 +66,10 @@ class Kamal::Configuration::Proxy::Boot File.join host_directory, "image_version" end + def run_command_file + File.join host_directory, "run_command" + end + def apps_directory File.join host_directory, "apps-config" end