Add run_command_file to proxy boot

This commit is contained in:
Donal McBreen
2025-05-06 12:14:58 +01:00
parent e32ea2e276
commit 226e7091db
3 changed files with 7 additions and 3 deletions

View File

@@ -78,7 +78,7 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
end end
if run_command 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 else
execute *KAMAL.proxy.reset_run_command, raise_on_non_zero_exit: false execute *KAMAL.proxy.reset_run_command, raise_on_non_zero_exit: false
end end

View File

@@ -86,7 +86,7 @@ class Kamal::Commands::Proxy < Kamal::Commands::Base
end end
def read_run_command def read_run_command
read_file(config.proxy_run_command_file) read_file(config.proxy_boot.run_command_file)
end end
def reset_boot_options def reset_boot_options
@@ -102,7 +102,7 @@ class Kamal::Commands::Proxy < Kamal::Commands::Base
end end
def reset_run_command def reset_run_command
remove_file config.proxy_run_command_file remove_file config.proxy_boot.run_command_file
end end
private private

View File

@@ -66,6 +66,10 @@ class Kamal::Configuration::Proxy::Boot
File.join host_directory, "image_version" File.join host_directory, "image_version"
end end
def run_command_file
File.join host_directory, "run_command"
end
def apps_directory def apps_directory
File.join host_directory, "apps-config" File.join host_directory, "apps-config"
end end