Fix Mux as env variable.

This commit is contained in:
Joao Patricio 2023-05-05 16:56:03 +01:00
parent 117ba360ac
commit 982f5beaf5
4 changed files with 6 additions and 3 deletions

View File

@ -19,6 +19,7 @@ public function __invoke(Server $server)
); );
$activity = remoteProcess([ $activity = remoteProcess([
"docker network ls --format '{{.Name}}' | grep '^coolify$' || docker network create coolify",
'mkdir -p projects', 'mkdir -p projects',
'mkdir -p projects/proxy', 'mkdir -p projects/proxy',
'mkdir -p projects/proxy/letsencrypt', 'mkdir -p projects/proxy/letsencrypt',

View File

@ -87,7 +87,7 @@ function generateSshCommand(string $private_key_location, string $server_ip, str
$delimiter = 'EOF-COOLIFY-SSH'; $delimiter = 'EOF-COOLIFY-SSH';
Storage::disk('local')->makeDirectory('.ssh'); Storage::disk('local')->makeDirectory('.ssh');
$ssh_command = "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 .= '-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} " $ssh_command .= "-i {$private_key_location} "

View File

@ -2,4 +2,6 @@
return [ return [
'version' => '4.0.0-nightly.2', 'version' => '4.0.0-nightly.2',
'mux_enabled' => env('MUX_ENABLED', true),
]; ];

View File

@ -6,9 +6,9 @@ export default defineConfig({
host: "0.0.0.0", host: "0.0.0.0",
hmr: process.env.GITPOD_WORKSPACE_URL 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 // '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( host: process.env.GITPOD_WORKSPACE_URL.replace(
"https://", "https://",
"5173-" "5173-"