An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fixes
Andras Bacsaid47bd047bfab
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.phpindex d28a399b9b..46149444f8 100644--- a/app/Console/Kernel.php+++ b/app/Console/Kernel.php@@ -4,10 +4,10 @@ namespace App\Console;use App\Jobs\CheckForUpdatesJob;use App\Jobs\CleanupInstanceStuffsJob;+use App\Jobs\CleanupSshKeysJob;use App\Jobs\CleanupStaleMultiplexedConnections;use App\Jobs\DatabaseBackupJob;use App\Jobs\DockerCleanupJob;-use App\Jobs\CleanupSshKeysJob;use App\Jobs\PullHelperImageJob;use App\Jobs\PullSentinelImageJob;use App\Jobs\PullTemplatesFromCDN;@@ -46,6 +46,7 @@ class Kernel extends ConsoleKernel$schedule->command('telescope:prune')->daily();$schedule->job(new CleanupSshKeysJob)->weekly()->onOneServer();+ $schedule->job(new PullHelperImageJob)->everyFiveMinutes()->onOneServer();} else {// Instance Jobs$schedule->command('horizon:snapshot')->everyFiveMinutes();@@ -82,11 +83,11 @@ class Kernel extends ConsoleKernel}})->cron($settings->update_check_frequency)->timezone($settings->instance_timezone)->onOneServer();}- $schedule->job(new PullHelperImageJob($server))- ->cron($settings->update_check_frequency)- ->timezone($settings->instance_timezone)- ->onOneServer();}+ $schedule->job(new PullHelperImageJob)+ ->cron($settings->update_check_frequency)+ ->timezone($settings->instance_timezone)+ ->onOneServer();}private function schedule_updates($schedule)diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.phpindex df7daa3b46..e3fe455c33 100644--- a/app/Jobs/ApplicationDeploymentJob.php+++ b/app/Jobs/ApplicationDeploymentJob.php@@ -968,7 +968,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue}}if ($this->application->environment_variables->where('key', 'COOLIFY_URL')->isEmpty()) {- $url = str($this->application->fqdn)->replace('http://', '').replace('https://', '');+ $url = str($this->application->fqdn)->replace('http://', '')->replace('https://', '');if ($this->application->compose_parsing_version === '3') {$envs->push("COOLIFY_FQDN={$url}");} else {@@ -1441,7 +1441,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueueif ($this->pull_request_id !== 0) {$local_branch = "pull/{$this->pull_request_id}/head";}- $private_key = $this->application->privateKey->getKeyLocation();+ $private_key = $this->application->privateKey?->getKeyLocation();if ($private_key) {$this->execute_remote_command([diff --git a/app/Jobs/PullHelperImageJob.php b/app/Jobs/PullHelperImageJob.phpindex 63b7fa9209..ef16596807 100644--- a/app/Jobs/PullHelperImageJob.php+++ b/app/Jobs/PullHelperImageJob.php@@ -9,7 +9,6 @@ use Illuminate\Contracts\Queue\ShouldBeEncrypted;use Illuminate\Contracts\Queue\ShouldQueue;use Illuminate\Foundation\Bus\Dispatchable;use Illuminate\Queue\InteractsWithQueue;-use Illuminate\Queue\Middleware\WithoutOverlapping;use Illuminate\Queue\SerializesModels;use Illuminate\Support\Facades\Http;@@ -19,17 +18,7 @@ class PullHelperImageJob implements ShouldBeEncrypted, ShouldQueuepublic $timeout = 1000;- public function middleware(): array- {- return [(new WithoutOverlapping($this->server->uuid))];- }-- public function uniqueId(): string- {- return $this->server->uuid;- }-- public function __construct(public Server $server) {}+ public function __construct() {}public function handle(): void{diff --git a/app/Livewire/Project/Shared/Terminal.php b/app/Livewire/Project/Shared/Terminal.phpindex 802e65a300..5fd098e9f5 100644--- a/app/Livewire/Project/Shared/Terminal.php+++ b/app/Livewire/Project/Shared/Terminal.php@@ -2,6 +2,7 @@namespace App\Livewire\Project\Shared;+use App\Helpers\SshMultiplexingHelper;use App\Models\Server;use Livewire\Attributes\On;use Livewire\Component;@@ -19,9 +20,9 @@ class Terminal extends Componentif ($status !== 'running') {return;}- $command = generateSshCommand($server, "docker exec -it {$identifier} sh -c 'if [ -f ~/.profile ]; then . ~/.profile; fi; if [ -n \"\$SHELL\" ]; then exec \$SHELL; else sh; fi'");+ $command = SshMultiplexingHelper::generateSshCommand($server, "docker exec -it {$identifier} sh -c 'if [ -f ~/.profile ]; then . ~/.profile; fi; if [ -n \"\$SHELL\" ]; then exec \$SHELL; else sh; fi'");} else {- $command = generateSshCommand($server, "sh -c 'if [ -f ~/.profile ]; then . ~/.profile; fi; if [ -n \"\$SHELL\" ]; then exec \$SHELL; else sh; fi'");+ $command = SshMultiplexingHelper::generateSshCommand($server, "sh -c 'if [ -f ~/.profile ]; then . ~/.profile; fi; if [ -n \"\$SHELL\" ]; then exec \$SHELL; else sh; fi'");}// ssh command is sent back to frontend then to websocketdiff --git a/app/Livewire/Security/PrivateKey/Show.php b/app/Livewire/Security/PrivateKey/Show.phpindex 14d2ed767d..249c84f147 100644--- a/app/Livewire/Security/PrivateKey/Show.php+++ b/app/Livewire/Security/PrivateKey/Show.php@@ -29,7 +29,7 @@ class Show extends Componenttry {$this->private_key = PrivateKey::ownedByCurrentTeam(['name', 'description', 'private_key', 'is_git_related'])->whereUuid(request()->private_key_uuid)->firstOrFail();} catch (\Throwable $e) {- return handleError($e, $this);+ abort(404);}}@@ -46,6 +46,7 @@ class Show extends Componenttry {$this->private_key->safeDelete();currentTeam()->privateKeys = PrivateKey::where('team_id', currentTeam()->id)->get();+return redirect()->route('security.private-key.index');} catch (\Exception $e) {$this->dispatch('error', $e->getMessage());@@ -58,7 +59,7 @@ class Show extends Component{try {$this->private_key->updatePrivateKey([- 'private_key' => formatPrivateKey($this->private_key->private_key)+ 'private_key' => formatPrivateKey($this->private_key->private_key),]);refresh_server_connection($this->private_key);$this->dispatch('success', 'Private key updated.');