Merge branch 'next' into fix-ssh-multiplexing-docker-desktop-windows
This commit is contained in:
@@ -6,7 +6,7 @@ APP_KEY=
|
|||||||
APP_URL=http://localhost
|
APP_URL=http://localhost
|
||||||
APP_PORT=8000
|
APP_PORT=8000
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
MUX_ENABLED=false
|
SSH_MUX_ENABLED=false
|
||||||
|
|
||||||
# PostgreSQL Database Configuration
|
# PostgreSQL Database Configuration
|
||||||
DB_DATABASE=coolify
|
DB_DATABASE=coolify
|
||||||
|
@@ -282,7 +282,7 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==
|
|||||||
public function validateServer()
|
public function validateServer()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
config()->set('coolify.mux_enabled', false);
|
config()->set('constants.ssh.mux_enabled', false);
|
||||||
|
|
||||||
// EC2 does not have `uptime` command, lol
|
// EC2 does not have `uptime` command, lol
|
||||||
instant_remote_process(['ls /'], $this->createdServer, true);
|
instant_remote_process(['ls /'], $this->createdServer, true);
|
||||||
|
@@ -967,7 +967,7 @@ $schema://$host {
|
|||||||
|
|
||||||
public function validateConnection()
|
public function validateConnection()
|
||||||
{
|
{
|
||||||
config()->set('coolify.mux_enabled', false);
|
config()->set('constants.ssh.mux_enabled', false);
|
||||||
|
|
||||||
$server = Server::find($this->id);
|
$server = Server::find($this->id);
|
||||||
if (! $server) {
|
if (! $server) {
|
||||||
|
@@ -667,7 +667,7 @@ class Service extends BaseModel
|
|||||||
}
|
}
|
||||||
$data = $data->merge([
|
$data = $data->merge([
|
||||||
'Root User' => [
|
'Root User' => [
|
||||||
'key' => 'N/A',
|
'key' => 'GITLAB_ROOT_USER',
|
||||||
'value' => 'root',
|
'value' => 'root',
|
||||||
'rules' => 'required',
|
'rules' => 'required',
|
||||||
'isPassword' => true,
|
'isPassword' => true,
|
||||||
|
@@ -137,6 +137,8 @@ function generate_default_proxy_configuration(Server $server)
|
|||||||
'external' => true,
|
'external' => true,
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
// TODO: This should not be null on new servers, but it is.
|
||||||
|
ray($proxy_type);
|
||||||
if ($proxy_type === ProxyTypes::TRAEFIK->value) {
|
if ($proxy_type === ProxyTypes::TRAEFIK->value) {
|
||||||
$labels = [
|
$labels = [
|
||||||
'traefik.enable=true',
|
'traefik.enable=true',
|
||||||
|
@@ -161,8 +161,8 @@ function generateSshCommand(Server $server, string $command)
|
|||||||
|
|
||||||
$ssh_command = "timeout $timeout ssh ";
|
$ssh_command = "timeout $timeout ssh ";
|
||||||
|
|
||||||
$muxEnabled = config('coolify.mux_enabled') && config('coolify.is_windows_docker_desktop') == false;
|
$muxEnabled = config('constants.ssh.mux_enabled') && config('coolify.is_windows_docker_desktop') == false;
|
||||||
|
// ray('SSH Multiplexing Enabled:', $muxEnabled)->blue();
|
||||||
if ($muxEnabled) {
|
if ($muxEnabled) {
|
||||||
// Always use multiplexing when enabled
|
// Always use multiplexing when enabled
|
||||||
$muxSocket = "/var/www/html/storage/app/ssh/mux/{$server->muxFilename()}";
|
$muxSocket = "/var/www/html/storage/app/ssh/mux/{$server->muxFilename()}";
|
||||||
@@ -212,7 +212,11 @@ function ensureMultiplexedConnection(Server $server)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$muxSocket = "/var/www/html/storage/app/ssh/mux/{$server->muxFilename()}";
|
$muxSocket = "/var/www/html/storage/app/ssh/mux/{$server->muxFilename()}";
|
||||||
$checkCommand = "ssh -O check -o ControlPath=$muxSocket {$server->user}@{$server->ip} 2>/dev/null";
|
$checkCommand = "ssh -O check -o ControlPath=$muxSocket ";
|
||||||
|
if (data_get($server, 'settings.is_cloudflare_tunnel')) {
|
||||||
|
$checkCommand .= '-o ProxyCommand="/usr/local/bin/cloudflared access ssh --hostname %h" ';
|
||||||
|
}
|
||||||
|
$checkCommand .= " {$server->user}@{$server->ip}";
|
||||||
|
|
||||||
$process = Process::run($checkCommand);
|
$process = Process::run($checkCommand);
|
||||||
|
|
||||||
@@ -233,8 +237,12 @@ function ensureMultiplexedConnection(Server $server)
|
|||||||
$serverInterval = config('constants.ssh.server_interval');
|
$serverInterval = config('constants.ssh.server_interval');
|
||||||
$muxPersistTime = config('constants.ssh.mux_persist_time');
|
$muxPersistTime = config('constants.ssh.mux_persist_time');
|
||||||
|
|
||||||
$establishCommand = "ssh -fNM -o ControlMaster=auto -o ControlPath=$muxSocket -o ControlPersist={$muxPersistTime} "
|
$establishCommand = "ssh -fNM -o ControlMaster=auto -o ControlPath=$muxSocket -o ControlPersist={$muxPersistTime} ";
|
||||||
."-i {$privateKeyLocation} "
|
|
||||||
|
if (data_get($server, 'settings.is_cloudflare_tunnel')) {
|
||||||
|
$establishCommand .= '-o ProxyCommand="/usr/local/bin/cloudflared access ssh --hostname %h" ';
|
||||||
|
}
|
||||||
|
$establishCommand .= "-i {$privateKeyLocation} "
|
||||||
.'-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null '
|
.'-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null '
|
||||||
.'-o PasswordAuthentication=no '
|
.'-o PasswordAuthentication=no '
|
||||||
."-o ConnectTimeout=$connectionTimeout "
|
."-o ConnectTimeout=$connectionTimeout "
|
||||||
@@ -313,7 +321,7 @@ function instant_remote_process(Collection|array $command, Server $server, bool
|
|||||||
$end_time = microtime(true);
|
$end_time = microtime(true);
|
||||||
|
|
||||||
$execution_time = ($end_time - $start_time) * 1000; // Convert to milliseconds
|
$execution_time = ($end_time - $start_time) * 1000; // Convert to milliseconds
|
||||||
// ray('SSH command execution time:', $execution_time.' ms')->orange();
|
ray('SSH command execution time:', $execution_time.' ms')->orange();
|
||||||
|
|
||||||
$output = trim($process->output());
|
$output = trim($process->output());
|
||||||
$exitCode = $process->exitCode();
|
$exitCode = $process->exitCode();
|
||||||
|
@@ -48,7 +48,6 @@
|
|||||||
"zircote/swagger-php": "^4.10"
|
"zircote/swagger-php": "^4.10"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"itsgoingd/clockwork": "^5.2",
|
|
||||||
"fakerphp/faker": "^v1.21.0",
|
"fakerphp/faker": "^v1.21.0",
|
||||||
"laravel/dusk": "^v8.0",
|
"laravel/dusk": "^v8.0",
|
||||||
"laravel/pint": "^1.16",
|
"laravel/pint": "^1.16",
|
||||||
|
507
composer.lock
generated
507
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,8 @@ return [
|
|||||||
'contact' => 'https://coolify.io/docs/contact',
|
'contact' => 'https://coolify.io/docs/contact',
|
||||||
],
|
],
|
||||||
'ssh' => [
|
'ssh' => [
|
||||||
'mux_enabled' => env('SSH_MUX_ENABLED', true),
|
// Using MUX
|
||||||
|
'mux_enabled' => env('MUX_ENABLED', env('SSH_MUX_ENABLED', true), true),
|
||||||
'mux_persist_time' => env('SSH_MUX_PERSIST_TIME', '1h'),
|
'mux_persist_time' => env('SSH_MUX_PERSIST_TIME', '1h'),
|
||||||
'connection_timeout' => 10,
|
'connection_timeout' => 10,
|
||||||
'server_interval' => 20,
|
'server_interval' => 20,
|
||||||
|
@@ -7,7 +7,6 @@ return [
|
|||||||
'self_hosted' => env('SELF_HOSTED', true),
|
'self_hosted' => env('SELF_HOSTED', true),
|
||||||
'waitlist' => env('WAITLIST', false),
|
'waitlist' => env('WAITLIST', false),
|
||||||
'license_url' => 'https://licenses.coollabs.io',
|
'license_url' => 'https://licenses.coollabs.io',
|
||||||
'mux_enabled' => env('MUX_ENABLED', true),
|
|
||||||
'dev_webhook' => env('SERVEO_URL'),
|
'dev_webhook' => env('SERVEO_URL'),
|
||||||
'is_windows_docker_desktop' => env('IS_WINDOWS_DOCKER_DESKTOP', false),
|
'is_windows_docker_desktop' => env('IS_WINDOWS_DOCKER_DESKTOP', false),
|
||||||
'base_config_path' => env('BASE_CONFIG_PATH', '/data/coolify'),
|
'base_config_path' => env('BASE_CONFIG_PATH', '/data/coolify'),
|
||||||
|
@@ -7,7 +7,7 @@ return [
|
|||||||
|
|
||||||
// The release version of your application
|
// The release version of your application
|
||||||
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
||||||
'release' => '4.0.0-beta.334',
|
'release' => '4.0.0-beta.335',
|
||||||
// When left empty or `null` the Laravel environment will be used
|
// When left empty or `null` the Laravel environment will be used
|
||||||
'environment' => config('app.env'),
|
'environment' => config('app.env'),
|
||||||
|
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return '4.0.0-beta.334';
|
return '4.0.0-beta.335';
|
||||||
|
@@ -48,6 +48,7 @@ services:
|
|||||||
- PUSHER_APP_SECRET
|
- PUSHER_APP_SECRET
|
||||||
- AUTOUPDATE
|
- AUTOUPDATE
|
||||||
- SELF_HOSTED
|
- SELF_HOSTED
|
||||||
|
- SSH_MUX_ENABLED
|
||||||
- SSH_MUX_PERSIST_TIME
|
- SSH_MUX_PERSIST_TIME
|
||||||
- FEEDBACK_DISCORD_WEBHOOK
|
- FEEDBACK_DISCORD_WEBHOOK
|
||||||
- WAITLIST
|
- WAITLIST
|
||||||
|
@@ -45,7 +45,7 @@ services:
|
|||||||
- PUSHER_APP_SECRET
|
- PUSHER_APP_SECRET
|
||||||
- AUTOUPDATE=true
|
- AUTOUPDATE=true
|
||||||
- SELF_HOSTED=true
|
- SELF_HOSTED=true
|
||||||
- MUX_ENABLED=false
|
- SSH_MUX_ENABLED=false
|
||||||
- IS_WINDOWS_DOCKER_DESKTOP=true
|
- IS_WINDOWS_DOCKER_DESKTOP=true
|
||||||
ports:
|
ports:
|
||||||
- "${APP_PORT:-8000}:80"
|
- "${APP_PORT:-8000}:80"
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"coolify": {
|
"coolify": {
|
||||||
"v4": {
|
"v4": {
|
||||||
"version": "4.0.0-beta.334"
|
"version": "4.0.0-beta.335"
|
||||||
},
|
},
|
||||||
"nightly": {
|
"nightly": {
|
||||||
"version": "4.0.0-beta.335"
|
"version": "4.0.0-beta.336"
|
||||||
},
|
},
|
||||||
"helper": {
|
"helper": {
|
||||||
"version": "1.0.1"
|
"version": "1.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user