add delete_connected_networks function to services.php
This commit is contained in:
@@ -151,7 +151,6 @@ class Application extends BaseModel
|
|||||||
$server = data_get($this, 'destination.server');
|
$server = data_get($this, 'destination.server');
|
||||||
$workdir = $this->workdir();
|
$workdir = $this->workdir();
|
||||||
if (str($workdir)->endsWith($this->uuid)) {
|
if (str($workdir)->endsWith($this->uuid)) {
|
||||||
ray('Deleting workdir');
|
|
||||||
instant_remote_process(['rm -rf ' . $this->workdir()], $server, false);
|
instant_remote_process(['rm -rf ' . $this->workdir()], $server, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -176,7 +175,6 @@ class Application extends BaseModel
|
|||||||
public function delete_connected_networks($uuid)
|
public function delete_connected_networks($uuid)
|
||||||
{
|
{
|
||||||
$server = data_get($this, 'destination.server');
|
$server = data_get($this, 'destination.server');
|
||||||
ray($uuid);
|
|
||||||
instant_remote_process(["docker network disconnect {$uuid} coolify-proxy"], $server, false);
|
instant_remote_process(["docker network disconnect {$uuid} coolify-proxy"], $server, false);
|
||||||
instant_remote_process(["docker network rm {$uuid}"], $server, false);
|
instant_remote_process(["docker network rm {$uuid}"], $server, false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,13 +121,20 @@ class Service extends BaseModel
|
|||||||
|
|
||||||
public function delete_configurations()
|
public function delete_configurations()
|
||||||
{
|
{
|
||||||
$server = data_get($this, 'server');
|
$server = data_get($this, 'destination.server');
|
||||||
$workdir = $this->workdir();
|
$workdir = $this->workdir();
|
||||||
if (str($workdir)->endsWith($this->uuid)) {
|
if (str($workdir)->endsWith($this->uuid)) {
|
||||||
instant_remote_process(['rm -rf ' . $this->workdir()], $server, false);
|
instant_remote_process(['rm -rf ' . $this->workdir()], $server, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function delete_connected_networks($uuid)
|
||||||
|
{
|
||||||
|
$server = data_get($this, 'destination.server');
|
||||||
|
instant_remote_process(["docker network disconnect {$uuid} coolify-proxy"], $server, false);
|
||||||
|
instant_remote_process(["docker network rm {$uuid}"], $server, false);
|
||||||
|
}
|
||||||
|
|
||||||
public function status()
|
public function status()
|
||||||
{
|
{
|
||||||
$applications = $this->applications;
|
$applications = $this->applications;
|
||||||
|
|||||||
Reference in New Issue
Block a user