fix: try to use old docker-compose
This commit is contained in:
parent
1093294f06
commit
c8ba98b93d
2 changed files with 7 additions and 4 deletions
|
|
@ -16,9 +16,12 @@ public function handle(Server $server, bool $reset = false)
|
||||||
"cat $proxy_path/docker-compose.yml",
|
"cat $proxy_path/docker-compose.yml",
|
||||||
], $server, false);
|
], $server, false);
|
||||||
|
|
||||||
if ($reset || is_null($proxy_configuration)) {
|
if ($reset || !$proxy_configuration || is_null($proxy_configuration)) {
|
||||||
$proxy_configuration = Str::of(generate_default_proxy_configuration($server))->trim()->value;
|
$proxy_configuration = Str::of(generate_default_proxy_configuration($server))->trim()->value;
|
||||||
}
|
}
|
||||||
|
if (!$proxy_configuration || is_null($proxy_configuration)) {
|
||||||
|
throw new \Exception("Could not generate proxy configuration");
|
||||||
|
}
|
||||||
return $proxy_configuration;
|
return $proxy_configuration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,9 +51,9 @@ public function handle(Server $server, bool $async = true): Activity|string
|
||||||
"cd $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',
|
||||||
"echo '####### Stopping existing coolify-proxy...'",
|
"echo '####### Stopping existing coolify-proxy...'",
|
||||||
"docker compose down -v --remove-orphans > /dev/null 2>&1 || true",
|
"docker compose down -v --remove-orphans > /dev/null 2>&1 || docker-compose down -v --remove-orphans > /dev/null 2>&1 || true",
|
||||||
"command -v fuser >/dev/null || command -v lsof >/dev/null || echo '####### Could not kill existing processes listening on port 80 & 443. Please stop the process holding these ports...'",
|
"command -v fuser >/dev/null || command -v lsof >/dev/null || echo '####### Could not kill existing processes listening on port 80 & 443. Please stop the process holding these ports...'",
|
||||||
"command -v lsof >/dev/null && lsof -nt -i:80 | xargs -r kill -9 || true",
|
"command -v lsof >/dev/null && lsof -nt -i:80 | xargs -r kill -9 || true",
|
||||||
"command -v lsof >/dev/null && lsof -nt -i:443 | xargs -r kill -9 || true",
|
"command -v lsof >/dev/null && lsof -nt -i:443 | xargs -r kill -9 || true",
|
||||||
|
|
@ -63,7 +63,7 @@ public function handle(Server $server, bool $async = true): Activity|string
|
||||||
"systemctl disable apache2 > /dev/null 2>&1 || true",
|
"systemctl disable apache2 > /dev/null 2>&1 || true",
|
||||||
"systemctl disable apache > /dev/null 2>&1 || true",
|
"systemctl disable apache > /dev/null 2>&1 || true",
|
||||||
"echo '####### Starting coolify-proxy...'",
|
"echo '####### Starting coolify-proxy...'",
|
||||||
'docker compose up -d --remove-orphans',
|
'docker compose up -d --remove-orphans || docker-compose up -d --remove-orphans',
|
||||||
"echo '####### Proxy installed successfully...'"
|
"echo '####### Proxy installed successfully...'"
|
||||||
];
|
];
|
||||||
if (!$async) {
|
if (!$async) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue