An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
revert
Andras Bacsaicc641d8cba97
diff --git a/app/Actions/Service/DeleteService.php b/app/Actions/Service/DeleteService.phpindex a70adfecf6..743158c2df 100644--- a/app/Actions/Service/DeleteService.php+++ b/app/Actions/Service/DeleteService.php@@ -10,43 +10,36 @@ class DeleteServiceuse AsAction;public function handle(Service $service){- try {- $server = data_get($service, 'server');- if ($server->isFunctional()) {- StopService::run($service);- $storagesToDelete = collect([]);-- $service->environment_variables()->delete();- $commands = [];- foreach ($service->applications()->get() as $application) {- $storages = $application->persistentStorages()->get();- foreach ($storages as $storage) {- $storagesToDelete->push($storage);- }- }- foreach ($service->databases()->get() as $database) {- $storages = $database->persistentStorages()->get();- foreach ($storages as $storage) {- $storagesToDelete->push($storage);- }- }- foreach ($storagesToDelete as $storage) {- $commands[] = "docker volume rm -f $storage->name";- }- $commands[] = "docker rm -f $service->uuid";+ $server = data_get($service, 'server');+ if ($server->isFunctional()) {+ StopService::run($service);+ }+ $storagesToDelete = collect([]);- instant_remote_process($commands, $server, false);+ $service->environment_variables()->delete();+ $commands = [];+ foreach ($service->applications()->get() as $application) {+ $storages = $application->persistentStorages()->get();+ foreach ($storages as $storage) {+ $storagesToDelete->push($storage);}- } catch (\Exception $e) {- throw new \Exception($e->getMessage());- } finally {- foreach ($service->applications()->get() as $application) {- $application->forceDelete();+ $application->forceDelete();+ }+ foreach ($service->databases()->get() as $database) {+ $storages = $database->persistentStorages()->get();+ foreach ($storages as $storage) {+ $storagesToDelete->push($storage);}- foreach ($service->databases()->get() as $database) {- $database->forceDelete();+ $database->forceDelete();+ }+ if ($server->isFunctional()) {+ foreach ($storagesToDelete as $storage) {+ $commands[] = "docker volume rm -f $storage->name";}- $service->forceDelete();+ $commands[] = "docker rm -f $service->uuid";++ instant_remote_process($commands, $server, false);}+ $service->forceDelete();}}