fix: service deletion function

This commit is contained in:
Andras Bacsai 2024-01-29 16:03:45 +01:00
parent 0c15e45419
commit 9e09c449cf

View File

@ -32,13 +32,14 @@ public function handle(Service $service)
} }
$database->forceDelete(); $database->forceDelete();
} }
if ($server->isFunctional()) {
foreach ($storagesToDelete as $storage) { foreach ($storagesToDelete as $storage) {
$commands[] = "docker volume rm -f $storage->name"; $commands[] = "docker volume rm -f $storage->name";
} }
$commands[] = "docker rm -f $service->uuid"; $commands[] = "docker rm -f $service->uuid";
instant_remote_process($commands, $server, false); instant_remote_process($commands, $server, false);
}
$service->forceDelete(); $service->forceDelete();
} }
} }