chore: Add comment explaining the purpose of disconnecting the network in cleanup_unused_network_from_coolify_proxy()
This commit is contained in:
@@ -107,6 +107,7 @@ class Init extends Command
|
|||||||
} else {
|
} else {
|
||||||
$data = collect(json_decode($out, true));
|
$data = collect(json_decode($out, true));
|
||||||
if ($data->count() === 1) {
|
if ($data->count() === 1) {
|
||||||
|
// If only coolify-proxy itself is connected to that network (it should not be possible, but who knows)
|
||||||
$isCoolifyProxyItself = data_get($data->first(), 'Name') === 'coolify-proxy';
|
$isCoolifyProxyItself = data_get($data->first(), 'Name') === 'coolify-proxy';
|
||||||
if ($isCoolifyProxyItself) {
|
if ($isCoolifyProxyItself) {
|
||||||
$commands->push("docker network disconnect $network coolify-proxy >/dev/null 2>&1 || true");
|
$commands->push("docker network disconnect $network coolify-proxy >/dev/null 2>&1 || true");
|
||||||
|
|||||||
Reference in New Issue
Block a user