fix: services should have destination as well

This commit is contained in:
Andras Bacsai
2023-10-01 13:59:22 +02:00
parent 23968e7886
commit 9ab5a1f7bd
5 changed files with 78 additions and 9 deletions

View File

@@ -20,7 +20,9 @@ class StopService
instant_remote_process(["docker rm -f {$db->name}-{$service->uuid}"], $service->server);
$db->update(['status' => 'exited']);
}
instant_remote_process(["docker network disconnect {$service->uuid} coolify-proxy 2>/dev/null"], $service->server, false);
instant_remote_process(["docker network rm {$service->uuid} 2>/dev/null"], $service->server, false);
if (is_null($service->destination)) {
instant_remote_process(["docker network disconnect {$service->uuid} coolify-proxy 2>/dev/null"], $service->server, false);
instant_remote_process(["docker network rm {$service->uuid} 2>/dev/null"], $service->server, false);
}
}
}