mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 04:14:59 +00:00
eat(api): add service-applications API to manage service applications
This commit is contained in:
1 parent
72118d61f9
commit
8ad65a0ef8
9 files changed
+1298
-2
No files matched your search
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Service;
|
||||
|
||||
use App\Models\ServiceApplication;
|
||||
use Lorisleiva\Actions\Concerns\AsAction;
|
||||
|
||||
class StopServiceApplication
|
||||
{
|
||||
use AsAction;
|
||||
|
||||
public string $jobQueue = 'high';
|
||||
|
||||
public function handle(ServiceApplication $serviceApplication): void
|
||||
{
|
||||
$service = $serviceApplication->service;
|
||||
$server = $service->destination->server;
|
||||
$containerName = $serviceApplication->name.'-'.$service->uuid;
|
||||
|
||||
instant_remote_process([
|
||||
"docker stop {$containerName}",
|
||||
], $server);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user