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
fix: restart sentinel once a day
Andras Bacsaic2a2757103ae
diff --git a/app/Actions/Server/RestartContainer.php b/app/Actions/Server/RestartContainer.phpnew file mode 100644index 0000000000..63361d8b71--- /dev/null+++ b/app/Actions/Server/RestartContainer.php@@ -0,0 +1,16 @@+<?php++namespace App\Actions\Server;++use App\Models\Server;+use Lorisleiva\Actions\Concerns\AsAction;++class RestartContainer+{+ use AsAction;++ public function handle(Server $server, string $containerName)+ {+ $server->restartContainer($containerName);+ }+}diff --git a/app/Console/Kernel.php b/app/Console/Kernel.phpindex e954b98c92..67ff819edf 100644--- a/app/Console/Kernel.php+++ b/app/Console/Kernel.php@@ -120,6 +120,13 @@ class Kernel extends ConsoleKernel} else {$schedule->job(new DockerCleanupJob($server))->everyTenMinutes()->timezone($serverTimezone)->onOneServer();}++ // Temporary solution until we have better memory management for Sentinel+ if ($server->isSentinelEnabled()) {+ $schedule->job(function () use ($server) {+ $server->restartContainer('coolify-sentinel');+ })->daily()->onOneServer();+ }}}diff --git a/app/Models/Server.php b/app/Models/Server.phpindex 2f023a2484..c9915e3fb3 100644--- a/app/Models/Server.php+++ b/app/Models/Server.php@@ -1253,4 +1253,9 @@ $schema://$host {{return base_url().'/server/'.$this->uuid;}++ public function restartContainer(string $containerName)+ {+ return instant_remote_process(['docker restart '.$containerName], $this, false);+ }}