Merge pull request #2797 from coollabsio/next

refactor: comment out unused code for network cleanup
This commit is contained in:
Andras Bacsai 2024-07-11 13:04:36 +02:00 committed by GitHub
commit 6072e7efc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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