From 579ed5b9c065c7d6158da434333524276158f1f1 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 24 May 2024 11:17:23 +0200 Subject: [PATCH] fix: build server should not have a proxy --- app/Actions/Proxy/CheckProxy.php | 7 +++++++ app/Livewire/Server/New/ByIp.php | 3 +++ 2 files changed, 10 insertions(+) diff --git a/app/Actions/Proxy/CheckProxy.php b/app/Actions/Proxy/CheckProxy.php index 8804eba23..79989f05b 100644 --- a/app/Actions/Proxy/CheckProxy.php +++ b/app/Actions/Proxy/CheckProxy.php @@ -13,6 +13,13 @@ public function handle(Server $server, $fromUI = false) if (!$server->isFunctional()) { return false; } + if ($server->isBuildServer()) { + if ($server->proxy) { + $server->proxy = null; + $server->save(); + } + return false; + } $proxyType = $server->proxyType(); if (is_null($proxyType) || $proxyType === 'NONE' || $server->proxy->force_stop) { ray('Not starting proxy'); diff --git a/app/Livewire/Server/New/ByIp.php b/app/Livewire/Server/New/ByIp.php index 1ce3df273..c56e9bec6 100644 --- a/app/Livewire/Server/New/ByIp.php +++ b/app/Livewire/Server/New/ByIp.php @@ -97,6 +97,9 @@ public function submit() if ($this->is_swarm_worker) { $payload['swarm_cluster'] = $this->selected_swarm_cluster; } + if ($this->is_build_server) { + data_forget($payload, 'proxy'); + } $server = Server::create($payload); if ($this->is_build_server) { $this->is_swarm_manager = false;