From 828fec944842eb50ee48c7590fe296a8b0ccc27b Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 8 Dec 2023 13:24:28 +0100 Subject: [PATCH] fix: do not create duplicated networks --- app/Actions/Service/StartService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Actions/Service/StartService.php b/app/Actions/Service/StartService.php index e4b334dff..7b79b2f32 100644 --- a/app/Actions/Service/StartService.php +++ b/app/Actions/Service/StartService.php @@ -16,7 +16,7 @@ class StartService $commands[] = "cd " . $service->workdir(); $commands[] = "echo 'Saved configuration files to {$service->workdir()}.'"; $commands[] = "echo 'Creating Docker network.'"; - $commands[] = "docker network create --attachable '{$service->uuid}' >/dev/null 2>&1 || true"; + $commands[] = "docker network inspect $network >/dev/null 2>&1 || docker network create --attachable $network >/dev/null 2>&1 || true"; $commands[] = "echo 'Starting service {$service->name} on {$service->server->name}.'"; $commands[] = "echo 'Pulling images.'"; $commands[] = "docker compose pull";