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();
} }
foreach ($storagesToDelete as $storage) { if ($server->isFunctional()) {
$commands[] = "docker volume rm -f $storage->name"; foreach ($storagesToDelete as $storage) {
$commands[] = "docker volume rm -f $storage->name";
}
$commands[] = "docker rm -f $service->uuid";
instant_remote_process($commands, $server, false);
} }
$commands[] = "docker rm -f $service->uuid";
instant_remote_process($commands, $server, false);
$service->forceDelete(); $service->forceDelete();
} }
} }