Skip to content

Commit 226e709

Browse files
committed
Add run_command_file to proxy boot
1 parent e32ea2e commit 226e709

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

lib/kamal/cli/proxy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def boot_config(subcommand)
7878
end
7979

8080
if run_command
81-
upload! StringIO.new(run_command), KAMAL.config.proxy_run_command_file
81+
upload! StringIO.new(run_command), proxy_boot_config.run_command_file
8282
else
8383
execute *KAMAL.proxy.reset_run_command, raise_on_non_zero_exit: false
8484
end

lib/kamal/commands/proxy.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def read_image_version
8686
end
8787

8888
def read_run_command
89-
read_file(config.proxy_run_command_file)
89+
read_file(config.proxy_boot.run_command_file)
9090
end
9191

9292
def reset_boot_options
@@ -102,7 +102,7 @@ def reset_image_version
102102
end
103103

104104
def reset_run_command
105-
remove_file config.proxy_run_command_file
105+
remove_file config.proxy_boot.run_command_file
106106
end
107107

108108
private

lib/kamal/configuration/proxy/boot.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ def image_version_file
6666
File.join host_directory, "image_version"
6767
end
6868

69+
def run_command_file
70+
File.join host_directory, "run_command"
71+
end
72+
6973
def apps_directory
7074
File.join host_directory, "apps-config"
7175
end

0 commit comments

Comments
 (0)