refactor: comment out unused code for network cleanup

This commit is contained in:
Andras Bacsai 2024-07-11 13:04:01 +02:00
parent 574bafd950
commit 19097c6692

View File

@ -23,14 +23,14 @@ public function handle(Server $server, bool $force = true)
instant_remote_process(['docker builder prune -f'], $server, false);
}
// cleanup networks
$networks = collectDockerNetworksByServer($server);
$proxyNetworks = collectProxyDockerNetworksByServer($server);
$diff = $proxyNetworks->diff($networks);
if ($diff->count() > 0) {
$diff->map(function ($network) use ($server) {
instant_remote_process(["docker network disconnect $network coolify-proxy"], $server);
instant_remote_process(["docker network rm $network"], $server);
});
}
// $networks = collectDockerNetworksByServer($server);
// $proxyNetworks = collectProxyDockerNetworksByServer($server);
// $diff = $proxyNetworks->diff($networks);
// if ($diff->count() > 0) {
// $diff->map(function ($network) use ($server) {
// instant_remote_process(["docker network disconnect $network coolify-proxy"], $server);
// instant_remote_process(["docker network rm $network"], $server);
// });
// }
}
}