From 982f5beaf5e6b38d4f546763a0c8e14c92cc187a Mon Sep 17 00:00:00 2001 From: Joao Patricio Date: Fri, 5 May 2023 16:56:03 +0100 Subject: [PATCH] Fix Mux as env variable. --- app/Actions/Proxy/InstallProxy.php | 1 + bootstrap/helpers.php | 2 +- config/coolify.php | 2 ++ vite.config.js | 4 ++-- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/Actions/Proxy/InstallProxy.php b/app/Actions/Proxy/InstallProxy.php index fb908b3d4..84429c7cf 100644 --- a/app/Actions/Proxy/InstallProxy.php +++ b/app/Actions/Proxy/InstallProxy.php @@ -19,6 +19,7 @@ class InstallProxy ); $activity = remoteProcess([ + "docker network ls --format '{{.Name}}' | grep '^coolify$' || docker network create coolify", 'mkdir -p projects', 'mkdir -p projects/proxy', 'mkdir -p projects/proxy/letsencrypt', diff --git a/bootstrap/helpers.php b/bootstrap/helpers.php index d913fb94f..2fc9b77b8 100644 --- a/bootstrap/helpers.php +++ b/bootstrap/helpers.php @@ -87,7 +87,7 @@ if (!function_exists('generateSshCommand')) { $delimiter = 'EOF-COOLIFY-SSH'; Storage::disk('local')->makeDirectory('.ssh'); $ssh_command = "ssh "; - if ($isMux) { + if ($isMux && config('coolify.mux_enabled')) { $ssh_command .= '-o ControlMaster=auto -o ControlPersist=1m -o ControlPath=/var/www/html/storage/app/.ssh/ssh_mux_%h_%p_%r '; } $ssh_command .= "-i {$private_key_location} " diff --git a/config/coolify.php b/config/coolify.php index 5438c7dab..95960c648 100644 --- a/config/coolify.php +++ b/config/coolify.php @@ -2,4 +2,6 @@ return [ 'version' => '4.0.0-nightly.2', + + 'mux_enabled' => env('MUX_ENABLED', true), ]; diff --git a/vite.config.js b/vite.config.js index ede21f48c..d999b843c 100644 --- a/vite.config.js +++ b/vite.config.js @@ -6,9 +6,9 @@ export default defineConfig({ host: "0.0.0.0", hmr: process.env.GITPOD_WORKSPACE_URL ? { - // Due to port fowarding, we have to replace + // Due to port forwarding, we have to replace // 'https' with the forwarded port, as this - // is the URI created by Gitpod. + // is the URI created by GitPod. host: process.env.GITPOD_WORKSPACE_URL.replace( "https://", "5173-"