Add run_command_file to proxy boot
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user