wip
This commit is contained in:
parent
e7763f3b73
commit
00a8c847e9
3
.gitignore
vendored
3
.gitignore
vendored
@ -21,6 +21,9 @@ yarn-error.log
|
|||||||
/.bash_history
|
/.bash_history
|
||||||
/_volumes
|
/_volumes
|
||||||
|
|
||||||
|
# Temp while developing Proxy deployment
|
||||||
|
resources/recipes
|
||||||
|
|
||||||
.lesshst
|
.lesshst
|
||||||
psysh_history
|
psysh_history
|
||||||
.psql_history
|
.psql_history
|
||||||
|
13
app/Data/ServerMetadata.php
Normal file
13
app/Data/ServerMetadata.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Data;
|
||||||
|
|
||||||
|
use App\Enums\ProxyTypes;
|
||||||
|
use Spatie\LaravelData\Data;
|
||||||
|
|
||||||
|
class ServerMetadata extends Data
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
public ?ProxyTypes $proxy,
|
||||||
|
) {}
|
||||||
|
}
|
10
app/Enums/ProxyTypes.php
Normal file
10
app/Enums/ProxyTypes.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Enums;
|
||||||
|
|
||||||
|
enum ProxyTypes: string
|
||||||
|
{
|
||||||
|
case TRAEFIK_V2 = 'TRAEFIK_V2';
|
||||||
|
case NGINX = 'NGINX';
|
||||||
|
case CADDY = 'CADDY';
|
||||||
|
}
|
@ -62,6 +62,7 @@ class ProjectController extends Controller
|
|||||||
if (!$application) {
|
if (!$application) {
|
||||||
return redirect()->route('home');
|
return redirect()->route('home');
|
||||||
}
|
}
|
||||||
|
|
||||||
$activity = Activity::query()
|
$activity = Activity::query()
|
||||||
->where('properties->type', '=', 'deployment')
|
->where('properties->type', '=', 'deployment')
|
||||||
->where('properties->uuid', '=', $deployment_uuid)
|
->where('properties->uuid', '=', $deployment_uuid)
|
||||||
|
16
app/Http/Controllers/ServerController.php
Normal file
16
app/Http/Controllers/ServerController.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\Server;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class ServerController extends Controller
|
||||||
|
{
|
||||||
|
public function show(Server $server)
|
||||||
|
{
|
||||||
|
return view('server.show', [
|
||||||
|
'server' => $server,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
44
app/Http/Livewire/ActivityMonitor.php
Normal file
44
app/Http/Livewire/ActivityMonitor.php
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Livewire;
|
||||||
|
|
||||||
|
use Livewire\Component;
|
||||||
|
use Spatie\Activitylog\Models\Activity;
|
||||||
|
|
||||||
|
class ActivityMonitor extends Component
|
||||||
|
{
|
||||||
|
public $activityId;
|
||||||
|
public $isPollingActive = false;
|
||||||
|
|
||||||
|
protected $activity;
|
||||||
|
protected $listeners = ['newMonitorActivity'];
|
||||||
|
|
||||||
|
public function hydrateActivity()
|
||||||
|
{
|
||||||
|
$this->activity = Activity::query()
|
||||||
|
->find($this->activityId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function newMonitorActivity($activityId)
|
||||||
|
{
|
||||||
|
$this->activityId = $activityId;
|
||||||
|
|
||||||
|
$this->hydrateActivity();
|
||||||
|
|
||||||
|
$this->isPollingActive = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function polling()
|
||||||
|
{
|
||||||
|
$this->hydrateActivity();
|
||||||
|
|
||||||
|
if (data_get($this->activity, 'properties.exitCode') !== null) {
|
||||||
|
$this->isPollingActive = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render()
|
||||||
|
{
|
||||||
|
return view('livewire.activity-monitor');
|
||||||
|
}
|
||||||
|
}
|
30
app/Http/Livewire/Server/Proxy.php
Normal file
30
app/Http/Livewire/Server/Proxy.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Livewire\Server;
|
||||||
|
|
||||||
|
use App\Models\Server;
|
||||||
|
use Livewire\Component;
|
||||||
|
|
||||||
|
class Proxy extends Component
|
||||||
|
{
|
||||||
|
public Server $server;
|
||||||
|
|
||||||
|
protected string $selectedProxy = '';
|
||||||
|
|
||||||
|
public function mount(Server $server)
|
||||||
|
{
|
||||||
|
$this->server = $server;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function runInstallProxy()
|
||||||
|
{
|
||||||
|
$activity = remoteProcess(['ls -alh'], $this->server);
|
||||||
|
|
||||||
|
$this->emit('newMonitorActivity', $activity->id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render()
|
||||||
|
{
|
||||||
|
return view('livewire.server.proxy');
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
|
use Spatie\SchemalessAttributes\Casts\SchemalessAttributes;
|
||||||
|
|
||||||
class Server extends BaseModel
|
class Server extends BaseModel
|
||||||
{
|
{
|
||||||
protected static function booted()
|
protected static function booted()
|
||||||
@ -12,10 +15,21 @@ class Server extends BaseModel
|
|||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public $casts = [
|
||||||
|
'extra_attributes' => SchemalessAttributes::class,
|
||||||
|
];
|
||||||
|
|
||||||
|
public function scopeWithExtraAttributes(): Builder
|
||||||
|
{
|
||||||
|
return $this->extra_attributes->modelScope();
|
||||||
|
}
|
||||||
|
|
||||||
public function privateKey()
|
public function privateKey()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(PrivateKey::class);
|
return $this->belongsTo(PrivateKey::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function settings()
|
public function settings()
|
||||||
{
|
{
|
||||||
return $this->hasOne(ServerSetting::class);
|
return $this->hasOne(ServerSetting::class);
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.2",
|
"php": "^8.2",
|
||||||
|
"doctrine/dbal": "^3.6",
|
||||||
"guzzlehttp/guzzle": "^7.5.0",
|
"guzzlehttp/guzzle": "^7.5.0",
|
||||||
"laravel/fortify": "^v1.16.0",
|
"laravel/fortify": "^v1.16.0",
|
||||||
"laravel/framework": "^v10.7.1",
|
"laravel/framework": "^v10.7.1",
|
||||||
@ -16,6 +17,7 @@
|
|||||||
"spatie/laravel-activitylog": "^4.7.3",
|
"spatie/laravel-activitylog": "^4.7.3",
|
||||||
"spatie/laravel-data": "^3.4.3",
|
"spatie/laravel-data": "^3.4.3",
|
||||||
"spatie/laravel-ray": "^1.32.4",
|
"spatie/laravel-ray": "^1.32.4",
|
||||||
|
"spatie/laravel-schemaless-attributes": "^2.4",
|
||||||
"symfony/yaml": "^6.2",
|
"symfony/yaml": "^6.2",
|
||||||
"visus/cuid2": "^2.0.0"
|
"visus/cuid2": "^2.0.0"
|
||||||
},
|
},
|
||||||
|
423
composer.lock
generated
423
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "d7ed21949975efcb1891e098e4d2abfa",
|
"content-hash": "4d4a58970bcb8990e0fa643bef8c8243",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "bacon/bacon-qr-code",
|
"name": "bacon/bacon-qr-code",
|
||||||
@ -241,6 +241,211 @@
|
|||||||
},
|
},
|
||||||
"time": "2022-10-27T11:44:00+00:00"
|
"time": "2022-10-27T11:44:00+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "doctrine/cache",
|
||||||
|
"version": "2.2.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/doctrine/cache.git",
|
||||||
|
"reference": "1ca8f21980e770095a31456042471a57bc4c68fb"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/doctrine/cache/zipball/1ca8f21980e770095a31456042471a57bc4c68fb",
|
||||||
|
"reference": "1ca8f21980e770095a31456042471a57bc4c68fb",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "~7.1 || ^8.0"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"doctrine/common": ">2.2,<2.4"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"cache/integration-tests": "dev-master",
|
||||||
|
"doctrine/coding-standard": "^9",
|
||||||
|
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
|
||||||
|
"psr/cache": "^1.0 || ^2.0 || ^3.0",
|
||||||
|
"symfony/cache": "^4.4 || ^5.4 || ^6",
|
||||||
|
"symfony/var-exporter": "^4.4 || ^5.4 || ^6"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Guilherme Blanco",
|
||||||
|
"email": "guilhermeblanco@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Roman Borschel",
|
||||||
|
"email": "roman@code-factory.org"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Benjamin Eberlei",
|
||||||
|
"email": "kontakt@beberlei.de"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jonathan Wage",
|
||||||
|
"email": "jonwage@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Johannes Schmitt",
|
||||||
|
"email": "schmittjoh@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.",
|
||||||
|
"homepage": "https://www.doctrine-project.org/projects/cache.html",
|
||||||
|
"keywords": [
|
||||||
|
"abstraction",
|
||||||
|
"apcu",
|
||||||
|
"cache",
|
||||||
|
"caching",
|
||||||
|
"couchdb",
|
||||||
|
"memcached",
|
||||||
|
"php",
|
||||||
|
"redis",
|
||||||
|
"xcache"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/doctrine/cache/issues",
|
||||||
|
"source": "https://github.com/doctrine/cache/tree/2.2.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://www.doctrine-project.org/sponsorship.html",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://www.patreon.com/phpdoctrine",
|
||||||
|
"type": "patreon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2022-05-20T20:07:39+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "doctrine/dbal",
|
||||||
|
"version": "3.6.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/doctrine/dbal.git",
|
||||||
|
"reference": "b4bd1cfbd2b916951696d82e57d054394d84864c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/doctrine/dbal/zipball/b4bd1cfbd2b916951696d82e57d054394d84864c",
|
||||||
|
"reference": "b4bd1cfbd2b916951696d82e57d054394d84864c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"composer-runtime-api": "^2",
|
||||||
|
"doctrine/cache": "^1.11|^2.0",
|
||||||
|
"doctrine/deprecations": "^0.5.3|^1",
|
||||||
|
"doctrine/event-manager": "^1|^2",
|
||||||
|
"php": "^7.4 || ^8.0",
|
||||||
|
"psr/cache": "^1|^2|^3",
|
||||||
|
"psr/log": "^1|^2|^3"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"doctrine/coding-standard": "11.1.0",
|
||||||
|
"fig/log-test": "^1",
|
||||||
|
"jetbrains/phpstorm-stubs": "2022.3",
|
||||||
|
"phpstan/phpstan": "1.10.9",
|
||||||
|
"phpstan/phpstan-strict-rules": "^1.5",
|
||||||
|
"phpunit/phpunit": "9.6.6",
|
||||||
|
"psalm/plugin-phpunit": "0.18.4",
|
||||||
|
"squizlabs/php_codesniffer": "3.7.2",
|
||||||
|
"symfony/cache": "^5.4|^6.0",
|
||||||
|
"symfony/console": "^4.4|^5.4|^6.0",
|
||||||
|
"vimeo/psalm": "4.30.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"symfony/console": "For helpful console commands such as SQL execution and import of files."
|
||||||
|
},
|
||||||
|
"bin": [
|
||||||
|
"bin/doctrine-dbal"
|
||||||
|
],
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Doctrine\\DBAL\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Guilherme Blanco",
|
||||||
|
"email": "guilhermeblanco@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Roman Borschel",
|
||||||
|
"email": "roman@code-factory.org"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Benjamin Eberlei",
|
||||||
|
"email": "kontakt@beberlei.de"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jonathan Wage",
|
||||||
|
"email": "jonwage@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.",
|
||||||
|
"homepage": "https://www.doctrine-project.org/projects/dbal.html",
|
||||||
|
"keywords": [
|
||||||
|
"abstraction",
|
||||||
|
"database",
|
||||||
|
"db2",
|
||||||
|
"dbal",
|
||||||
|
"mariadb",
|
||||||
|
"mssql",
|
||||||
|
"mysql",
|
||||||
|
"oci8",
|
||||||
|
"oracle",
|
||||||
|
"pdo",
|
||||||
|
"pgsql",
|
||||||
|
"postgresql",
|
||||||
|
"queryobject",
|
||||||
|
"sasql",
|
||||||
|
"sql",
|
||||||
|
"sqlite",
|
||||||
|
"sqlserver",
|
||||||
|
"sqlsrv"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/doctrine/dbal/issues",
|
||||||
|
"source": "https://github.com/doctrine/dbal/tree/3.6.2"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://www.doctrine-project.org/sponsorship.html",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://www.patreon.com/phpdoctrine",
|
||||||
|
"type": "patreon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2023-04-14T07:25:38+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/deprecations",
|
"name": "doctrine/deprecations",
|
||||||
"version": "v1.0.0",
|
"version": "v1.0.0",
|
||||||
@ -284,6 +489,97 @@
|
|||||||
},
|
},
|
||||||
"time": "2022-05-02T15:47:09+00:00"
|
"time": "2022-05-02T15:47:09+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "doctrine/event-manager",
|
||||||
|
"version": "2.0.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/doctrine/event-manager.git",
|
||||||
|
"reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/doctrine/event-manager/zipball/750671534e0241a7c50ea5b43f67e23eb5c96f32",
|
||||||
|
"reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^8.1"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"doctrine/common": "<2.9"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"doctrine/coding-standard": "^10",
|
||||||
|
"phpstan/phpstan": "^1.8.8",
|
||||||
|
"phpunit/phpunit": "^9.5",
|
||||||
|
"vimeo/psalm": "^4.28"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Doctrine\\Common\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Guilherme Blanco",
|
||||||
|
"email": "guilhermeblanco@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Roman Borschel",
|
||||||
|
"email": "roman@code-factory.org"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Benjamin Eberlei",
|
||||||
|
"email": "kontakt@beberlei.de"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jonathan Wage",
|
||||||
|
"email": "jonwage@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Johannes Schmitt",
|
||||||
|
"email": "schmittjoh@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Marco Pivetta",
|
||||||
|
"email": "ocramius@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.",
|
||||||
|
"homepage": "https://www.doctrine-project.org/projects/event-manager.html",
|
||||||
|
"keywords": [
|
||||||
|
"event",
|
||||||
|
"event dispatcher",
|
||||||
|
"event manager",
|
||||||
|
"event system",
|
||||||
|
"events"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/doctrine/event-manager/issues",
|
||||||
|
"source": "https://github.com/doctrine/event-manager/tree/2.0.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://www.doctrine-project.org/sponsorship.html",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://www.patreon.com/phpdoctrine",
|
||||||
|
"type": "patreon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2022-10-12T20:59:15+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/inflector",
|
"name": "doctrine/inflector",
|
||||||
"version": "2.0.6",
|
"version": "2.0.6",
|
||||||
@ -2960,6 +3256,55 @@
|
|||||||
},
|
},
|
||||||
"time": "2022-06-13T21:57:56+00:00"
|
"time": "2022-06-13T21:57:56+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/cache",
|
||||||
|
"version": "3.0.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/cache.git",
|
||||||
|
"reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
|
||||||
|
"reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.0.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\Cache\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "https://www.php-fig.org/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Common interface for caching libraries",
|
||||||
|
"keywords": [
|
||||||
|
"cache",
|
||||||
|
"psr",
|
||||||
|
"psr-6"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/php-fig/cache/tree/3.0.0"
|
||||||
|
},
|
||||||
|
"time": "2021-02-03T23:26:27+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/clock",
|
"name": "psr/clock",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
@ -4054,6 +4399,82 @@
|
|||||||
],
|
],
|
||||||
"time": "2023-03-23T08:04:54+00:00"
|
"time": "2023-03-23T08:04:54+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "spatie/laravel-schemaless-attributes",
|
||||||
|
"version": "2.4.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/spatie/laravel-schemaless-attributes.git",
|
||||||
|
"reference": "ae19842763fe8d5a5059f8a7c0802bee6662b00c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/spatie/laravel-schemaless-attributes/zipball/ae19842763fe8d5a5059f8a7c0802bee6662b00c",
|
||||||
|
"reference": "ae19842763fe8d5a5059f8a7c0802bee6662b00c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"illuminate/contracts": "^7.0|^8.0|^9.0|^10.0",
|
||||||
|
"illuminate/database": "^7.0|^8.0|^9.0|^10.0",
|
||||||
|
"illuminate/support": "^7.0|^8.0|^9.0|^10.0",
|
||||||
|
"php": "^8.0",
|
||||||
|
"spatie/laravel-package-tools": "^1.4.3"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"brianium/paratest": "^6.2",
|
||||||
|
"mockery/mockery": "^1.4",
|
||||||
|
"nunomaduro/collision": "^5.3|^6.0",
|
||||||
|
"orchestra/testbench": "^6.15|^7.0|^8.0",
|
||||||
|
"pestphp/pest-plugin-laravel": "^1.3",
|
||||||
|
"phpunit/phpunit": "^9.5.4"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Spatie\\SchemalessAttributes\\SchemalessAttributesServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Spatie\\SchemalessAttributes\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Freek Van der Herten",
|
||||||
|
"email": "freek@spatie.be",
|
||||||
|
"homepage": "https://spatie.be",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Add schemaless attributes to Eloquent models",
|
||||||
|
"homepage": "https://github.com/spatie/laravel-schemaless-attributes",
|
||||||
|
"keywords": [
|
||||||
|
"laravel-schemaless-attributes",
|
||||||
|
"spatie"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/spatie/laravel-schemaless-attributes/issues",
|
||||||
|
"source": "https://github.com/spatie/laravel-schemaless-attributes/tree/2.4.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://spatie.be/open-source/support-us",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/spatie",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2023-01-14T20:58:52+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/macroable",
|
"name": "spatie/macroable",
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
|
@ -21,6 +21,7 @@ return new class extends Migration
|
|||||||
$table->string('user')->default('root');
|
$table->string('user')->default('root');
|
||||||
$table->foreignId('team_id');
|
$table->foreignId('team_id');
|
||||||
$table->foreignId('private_key_id');
|
$table->foreignId('private_key_id');
|
||||||
|
$table->schemalessAttributes('extra_attributes');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace Database\Seeders;
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use App\Data\ServerMetadata;
|
||||||
|
use App\Enums\ProxyTypes;
|
||||||
use App\Models\PrivateKey;
|
use App\Models\PrivateKey;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use App\Models\Team;
|
use App\Models\Team;
|
||||||
@ -16,6 +18,7 @@ class ServerSeeder extends Seeder
|
|||||||
{
|
{
|
||||||
$root_team = Team::find(0);
|
$root_team = Team::find(0);
|
||||||
$private_key_1 = PrivateKey::find(1);
|
$private_key_1 = PrivateKey::find(1);
|
||||||
|
|
||||||
Server::create([
|
Server::create([
|
||||||
'id' => 1,
|
'id' => 1,
|
||||||
'name' => "testing-local-docker-container",
|
'name' => "testing-local-docker-container",
|
||||||
@ -23,6 +26,9 @@ class ServerSeeder extends Seeder
|
|||||||
'ip' => "coolify-testing-host",
|
'ip' => "coolify-testing-host",
|
||||||
'team_id' => $root_team->id,
|
'team_id' => $root_team->id,
|
||||||
'private_key_id' => $private_key_1->id,
|
'private_key_id' => $private_key_1->id,
|
||||||
|
'extra_attributes' => ServerMetadata::from([
|
||||||
|
'proxy' => ProxyTypes::TRAEFIK_V2->value
|
||||||
|
]),
|
||||||
]);
|
]);
|
||||||
Server::create([
|
Server::create([
|
||||||
'id' => 2,
|
'id' => 2,
|
||||||
@ -31,6 +37,9 @@ class ServerSeeder extends Seeder
|
|||||||
'ip' => "coolify-testing-host-2",
|
'ip' => "coolify-testing-host-2",
|
||||||
'team_id' => $root_team->id,
|
'team_id' => $root_team->id,
|
||||||
'private_key_id' => $private_key_1->id,
|
'private_key_id' => $private_key_1->id,
|
||||||
|
'extra_attributes' => ServerMetadata::from([
|
||||||
|
//
|
||||||
|
]),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<x-layout>
|
<x-layout>
|
||||||
<h1>Servers</h1>
|
<h1>Servers</h1>
|
||||||
@forelse ($servers as $server)
|
@forelse ($servers as $server)
|
||||||
<a href="{{ route('project.environments', [$server->uuid]) }}">{{ data_get($server, 'name') }}</a>
|
<a href="{{ route('server.show', [$server->uuid]) }}">{{ data_get($server, 'name') }}</a>
|
||||||
@empty
|
@empty
|
||||||
<p>No servers found.</p>
|
<p>No servers found.</p>
|
||||||
@endforelse
|
@endforelse
|
||||||
|
17
resources/views/livewire/activity-monitor.blade.php
Normal file
17
resources/views/livewire/activity-monitor.blade.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<div class="mt-8">
|
||||||
|
@isset($this->activity)
|
||||||
|
<span>Activity: {{ $this->activity?->id }}</span>
|
||||||
|
<span>Status: {{ $this->activity?->properties->get('status') }}</span>
|
||||||
|
<pre
|
||||||
|
class="h-[400px] flex flex-col-reverse w-full bg-[#cbcbcb] overflow-y-scroll"
|
||||||
|
@if($isPollingActive)
|
||||||
|
wire:poll.750ms="polling"
|
||||||
|
@endif
|
||||||
|
>{{
|
||||||
|
\App\Actions\CoolifyTask\RunRemoteProcess::decodeOutput($this->activity)
|
||||||
|
}}</pre>
|
||||||
|
@else
|
||||||
|
Not monitoring any activity.
|
||||||
|
@endisset
|
||||||
|
|
||||||
|
</div>
|
30
resources/views/livewire/server/proxy.blade.php
Normal file
30
resources/views/livewire/server/proxy.blade.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<div>
|
||||||
|
<h2> Proxy </h2>
|
||||||
|
|
||||||
|
@if($this->server->extra_attributes->proxy)
|
||||||
|
<div class="mt-12">
|
||||||
|
<div>
|
||||||
|
Proxy type: {{ $this->server->extra_attributes->proxy }}
|
||||||
|
</div>
|
||||||
|
<div class="mt-12"> Features in W11.</div>
|
||||||
|
<ul>
|
||||||
|
<li>Edit config file</li>
|
||||||
|
<li>Enable dashboard (blocking port by firewall)</li>
|
||||||
|
<li>Dashboard access - login/password</li>
|
||||||
|
<li>Setup host for Traefik Dashboard</li>
|
||||||
|
<li>Visit (nav to traefik dashboard)</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
No proxy installed.
|
||||||
|
<select wire:model="selectedProxy">
|
||||||
|
<option value="{{ \App\Enums\ProxyTypes::TRAEFIK_V2 }}">
|
||||||
|
{{ \App\Enums\ProxyTypes::TRAEFIK_V2 }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
<button wire:click="runInstallProxy">Install Proxy</button>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<livewire:activity-monitor />
|
||||||
|
|
||||||
|
</div>
|
5
resources/views/server/show.blade.php
Normal file
5
resources/views/server/show.blade.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<x-layout>
|
||||||
|
<h1> {{ $server->name }}</h1>
|
||||||
|
|
||||||
|
<livewire:server.proxy :server="$server"/>
|
||||||
|
</x-layout>
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use App\Http\Controllers\HomeController;
|
use App\Http\Controllers\HomeController;
|
||||||
use App\Http\Controllers\ProjectController;
|
use App\Http\Controllers\ProjectController;
|
||||||
|
use App\Http\Controllers\ServerController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -26,6 +27,8 @@ Route::middleware(['auth'])->group(function () {
|
|||||||
Route::get('/project/{project_uuid}/{environment_name}/application/{application_uuid}', [ProjectController::class, 'application'])->name('project.application');
|
Route::get('/project/{project_uuid}/{environment_name}/application/{application_uuid}', [ProjectController::class, 'application'])->name('project.application');
|
||||||
Route::get('/project/{project_uuid}/{environment_name}/application/{application_uuid}/deployment/{deployment_uuid}', [ProjectController::class, 'deployment'])->name('project.deployment');
|
Route::get('/project/{project_uuid}/{environment_name}/application/{application_uuid}/deployment/{deployment_uuid}', [ProjectController::class, 'deployment'])->name('project.deployment');
|
||||||
|
|
||||||
|
Route::get('/server/{server:uuid}', [ServerController::class, 'show'])->name('server.show');
|
||||||
|
|
||||||
// Route::get('/database/{database_uuid}', [ProjectController::class, 'database'])->name('project.database');
|
// Route::get('/database/{database_uuid}', [ProjectController::class, 'database'])->name('project.database');
|
||||||
// Route::get('//service/{service_uuid}', [ProjectController::class, 'service'])->name('project.service');
|
// Route::get('//service/{service_uuid}', [ProjectController::class, 'service'])->name('project.service');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user