From 3d8e6f2215a9ff431d605d5f3962c63626b6e976 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 16 Jun 2023 16:15:44 +0200 Subject: [PATCH] fix --- app/Actions/Proxy/InstallProxy.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Actions/Proxy/InstallProxy.php b/app/Actions/Proxy/InstallProxy.php index d0a1a8356..21c19d3a6 100644 --- a/app/Actions/Proxy/InstallProxy.php +++ b/app/Actions/Proxy/InstallProxy.php @@ -2,6 +2,8 @@ namespace App\Actions\Proxy; +use App\Enums\ProxyStatus; +use App\Enums\ProxyTypes; use App\Models\Server; use Spatie\Activitylog\Models\Activity; use Illuminate\Support\Str; @@ -10,6 +12,11 @@ class InstallProxy { public function __invoke(Server $server): Activity { + if (is_null(data_get($server, 'extra_attributes.proxy_type'))) { + $server->extra_attributes->proxy_type = ProxyTypes::TRAEFIK_V2->value; + $server->extra_attributes->proxy_status = ProxyStatus::EXITED->value; + $server->save(); + } $proxy_path = config('coolify.proxy_config_path'); $networks = collect($server->standaloneDockers)->map(function ($docker) {