Create the .kamal/proxy/apps-config directory

Manually create it to avoid ownership issues when docker creates it
for you.
This commit is contained in:
Donal McBreen
2025-04-22 15:18:54 +01:00
parent 8789a1b10c
commit d26b3f1768
4 changed files with 15 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
if version && Kamal::Utils.older_version?(version, Kamal::Configuration::PROXY_MINIMUM_VERSION)
raise "kamal-proxy version #{version} is too old, run `kamal proxy reboot` in order to update to at least #{Kamal::Configuration::PROXY_MINIMUM_VERSION}"
end
execute *KAMAL.proxy.ensure_apps_config_directory
execute *KAMAL.proxy.start_or_run
end
end
@@ -101,6 +102,7 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
"Stopping and removing kamal-proxy on #{host}, if running..."
execute *KAMAL.proxy.stop, raise_on_non_zero_exit: false
execute *KAMAL.proxy.remove_container
execute *KAMAL.proxy.ensure_apps_config_directory
execute *KAMAL.proxy.run

View File

@@ -65,6 +65,10 @@ class Kamal::Commands::Proxy < Kamal::Commands::Base
remove_directory config.proxy_directory
end
def ensure_apps_config_directory
make_directory config.proxy_apps_directory
end
def boot_config
[ :echo, "#{substitute(read_boot_options)} #{substitute(read_image)}:#{substitute(read_image_version)}" ]
end