refactor: Simplify log drain installation and stop log drain if necessary

This commit is contained in:
Andras Bacsai
2024-08-06 10:52:47 +02:00
parent c5de1a25c3
commit 74e8a4a703
3 changed files with 25 additions and 6 deletions

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Actions\Server;
use App\Models\Server;
use Lorisleiva\Actions\Concerns\AsAction;
class StopLogDrain
{
use AsAction;
public function handle(Server $server)
{
try {
return instant_remote_process(['docker rm -f coolify-log-drain || true'], $server);
} catch (\Throwable $e) {
return handleError($e);
}
}
}