diff --git a/app/Actions/Proxy/CheckConfiguration.php b/app/Actions/Proxy/CheckConfiguration.php index e244296c5..7a1cb04ed 100644 --- a/app/Actions/Proxy/CheckConfiguration.php +++ b/app/Actions/Proxy/CheckConfiguration.php @@ -13,6 +13,7 @@ public function handle(Server $server, bool $reset = false) { $proxy_path = get_proxy_path(); $proxy_configuration = instant_remote_process([ + "mkdir -p $proxy_path", "cat $proxy_path/docker-compose.yml", ], $server, false); diff --git a/app/Actions/Proxy/StartProxy.php b/app/Actions/Proxy/StartProxy.php index ab5d1733e..6d950a861 100644 --- a/app/Actions/Proxy/StartProxy.php +++ b/app/Actions/Proxy/StartProxy.php @@ -31,7 +31,7 @@ public function handle(Server $server, bool $async = true): Activity|string "command -v lsof >/dev/null || apt-get update", "command -v lsof >/dev/null || apt install -y lsof", "command -v lsof >/dev/null || command -v fuser >/dev/null || apt install -y psmisc", - "cd $proxy_path", + "mkdir -p $proxy_path && cd $proxy_path", "echo '####### Creating Docker Compose file...'", "echo '####### Pulling docker image...'", 'docker compose pull || docker-compose pull', diff --git a/bootstrap/helpers/proxy.php b/bootstrap/helpers/proxy.php index b92509066..ea0f069c7 100644 --- a/bootstrap/helpers/proxy.php +++ b/bootstrap/helpers/proxy.php @@ -106,12 +106,11 @@ function generate_default_proxy_configuration(Server $server) function setup_default_redirect_404(string|null $redirect_url, Server $server) { - ray('called'); $traefik_dynamic_conf_path = get_proxy_path() . "/dynamic"; $traefik_default_redirect_file = "$traefik_dynamic_conf_path/default_redirect_404.yaml"; - ray($redirect_url); if (empty($redirect_url)) { instant_remote_process([ + "mkdir -p $traefik_dynamic_conf_path", "rm -f $traefik_default_redirect_file", ], $server); } else { @@ -171,7 +170,6 @@ function setup_default_redirect_404(string|null $redirect_url, Server $server) $yaml; $base64 = base64_encode($yaml); - ray("mkdir -p $traefik_dynamic_conf_path"); instant_remote_process([ "mkdir -p $traefik_dynamic_conf_path", "echo '$base64' | base64 -d > $traefik_default_redirect_file",