This package gives you tiles to display the status of your infrastructure managed with Ploi.io. It can add deployment status from one or multiple sites and the state of your server resources. For the latter you need a subscription which includes server-monitoring.
This tile can be used on the Laravel Dashboard.
You can install the package via composer:
composer require vannut/laravel-dashboard-ploi-tile
First obtain a personal access-token with the following permissions: read_servers
& read_sites
Change your /config/dashboard.php
to have a ploi entry in the dashboard.tiles
array:
// ...
'tiles' => [
// ...
'ploi' => [
// Your api token
'api_token' => 'eyJ0eXAi.....',
// the server which you want to show
'servers' => [1234],
// Sites for which you want to track deployments
// serverId:siteId
'sites' => [
'1234:5678'
],
// optional
// 'alert_tresholds' => [
// 'cpu' => 75,
// 'ram' => 75,
// 'disk' => 80
// ],
// 'deployment_refresh_interval_in_seconds' => 10
// 'resources_refresh_interval_in_seconds' => 60
],
]
In app\Console\Kernel.php
you need to schedule the commands below to run every x minutes. Off course only add the command(s) you need for your dashboard.
protected function schedule(Schedule $schedule)
{
$schedule->command(Vannut\PloiTile\FetchDeploymentDataFromApiCommand::class)->everyMinute();
// $schedule->command(Vannut\PloiTile\FetchResourcesDataFromApiCommand::class)->everyMinute(); not yet implemented
}
In your dashboard you will have the following tiles at your disposal
<x-dashboard>
<livewire:ploi-resources-tile position="a1:a6" />
<livewire:ploi-deployments-tile position="b1:b6" />
<livewire:ploi-single-deployment-tile
position="c1"
id="1234:5678"
/>
</x-dashboard>
composer test
Please see CONTRIBUTING for details.
If you discover any security related issues, please email security@vannut.nl instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.