fix: make sure proxy path created
This commit is contained in:
parent
78b9166bdb
commit
9bc61a0a17
@ -13,6 +13,7 @@ class CheckConfiguration
|
|||||||
{
|
{
|
||||||
$proxy_path = get_proxy_path();
|
$proxy_path = get_proxy_path();
|
||||||
$proxy_configuration = instant_remote_process([
|
$proxy_configuration = instant_remote_process([
|
||||||
|
"mkdir -p $proxy_path",
|
||||||
"cat $proxy_path/docker-compose.yml",
|
"cat $proxy_path/docker-compose.yml",
|
||||||
], $server, false);
|
], $server, false);
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ class StartProxy
|
|||||||
"command -v lsof >/dev/null || apt-get update",
|
"command -v lsof >/dev/null || apt-get update",
|
||||||
"command -v lsof >/dev/null || apt install -y lsof",
|
"command -v lsof >/dev/null || apt install -y lsof",
|
||||||
"command -v lsof >/dev/null || command -v fuser >/dev/null || apt install -y psmisc",
|
"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 '####### Creating Docker Compose file...'",
|
||||||
"echo '####### Pulling docker image...'",
|
"echo '####### Pulling docker image...'",
|
||||||
'docker compose pull || docker-compose pull',
|
'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)
|
function setup_default_redirect_404(string|null $redirect_url, Server $server)
|
||||||
{
|
{
|
||||||
ray('called');
|
|
||||||
$traefik_dynamic_conf_path = get_proxy_path() . "/dynamic";
|
$traefik_dynamic_conf_path = get_proxy_path() . "/dynamic";
|
||||||
$traefik_default_redirect_file = "$traefik_dynamic_conf_path/default_redirect_404.yaml";
|
$traefik_default_redirect_file = "$traefik_dynamic_conf_path/default_redirect_404.yaml";
|
||||||
ray($redirect_url);
|
|
||||||
if (empty($redirect_url)) {
|
if (empty($redirect_url)) {
|
||||||
instant_remote_process([
|
instant_remote_process([
|
||||||
|
"mkdir -p $traefik_dynamic_conf_path",
|
||||||
"rm -f $traefik_default_redirect_file",
|
"rm -f $traefik_default_redirect_file",
|
||||||
], $server);
|
], $server);
|
||||||
} else {
|
} else {
|
||||||
@ -171,7 +170,6 @@ function setup_default_redirect_404(string|null $redirect_url, Server $server)
|
|||||||
$yaml;
|
$yaml;
|
||||||
|
|
||||||
$base64 = base64_encode($yaml);
|
$base64 = base64_encode($yaml);
|
||||||
ray("mkdir -p $traefik_dynamic_conf_path");
|
|
||||||
instant_remote_process([
|
instant_remote_process([
|
||||||
"mkdir -p $traefik_dynamic_conf_path",
|
"mkdir -p $traefik_dynamic_conf_path",
|
||||||
"echo '$base64' | base64 -d > $traefik_default_redirect_file",
|
"echo '$base64' | base64 -d > $traefik_default_redirect_file",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user