fix: remove volumes as well
This commit is contained in:
parent
e63e806572
commit
f2d82e16d6
@ -39,9 +39,13 @@ public function handle(Application $application)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($application->build_pack === 'dockercompose') {
|
if ($application->build_pack === 'dockercompose') {
|
||||||
|
// remove network
|
||||||
$uuid = $application->uuid;
|
$uuid = $application->uuid;
|
||||||
instant_remote_process(["docker network disconnect {$uuid} coolify-proxy"], $server);
|
instant_remote_process(["docker network disconnect {$uuid} coolify-proxy"], $server, false);
|
||||||
instant_remote_process(["docker network rm {$uuid}"], $server);
|
instant_remote_process(["docker network rm {$uuid}"], $server, false);
|
||||||
|
|
||||||
|
// remove volumes
|
||||||
|
instant_remote_process(["cd {$application->dirOnServer()} && docker compose down -v"], $server, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -778,6 +778,11 @@ public function generateBaseDir(string $uuid)
|
|||||||
return "/artifacts/{$uuid}";
|
return "/artifacts/{$uuid}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function dirOnServer()
|
||||||
|
{
|
||||||
|
return application_configuration_dir()."/{$this->uuid}";
|
||||||
|
}
|
||||||
|
|
||||||
public function setGitImportSettings(string $deployment_uuid, string $git_clone_command, bool $public = false)
|
public function setGitImportSettings(string $deployment_uuid, string $git_clone_command, bool $public = false)
|
||||||
{
|
{
|
||||||
$baseDir = $this->generateBaseDir($deployment_uuid);
|
$baseDir = $this->generateBaseDir($deployment_uuid);
|
||||||
|
Loading…
Reference in New Issue
Block a user