fix: make sure proxy path created
This commit is contained in:
parent
78b9166bdb
commit
9bc61a0a17
@ -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);
|
||||
|
||||
|
@ -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',
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user