wip: swarm

This commit is contained in:
Andras Bacsai
2023-12-18 14:01:25 +01:00
parent 27c36bec83
commit 62c38c9859
24 changed files with 387 additions and 114 deletions

View File

@@ -80,14 +80,18 @@ function generate_default_proxy_configuration(Server $server)
$networks = collect($server->swarmDockers)->map(function ($docker) {
return $docker['network'];
})->unique();
if ($networks->count() === 0) {
$networks = collect(['coolify-overlay']);
}
} else {
$networks = collect($server->standaloneDockers)->map(function ($docker) {
return $docker['network'];
})->unique();
if ($networks->count() === 0) {
$networks = collect(['coolify']);
}
}
if ($networks->count() === 0) {
$networks = collect(['coolify']);
}
$array_of_networks = collect([]);
$networks->map(function ($network) use ($array_of_networks) {
$array_of_networks[$network] = [