wip: services

feat: able to map port<->domain
This commit is contained in:
Andras Bacsai
2023-09-22 14:47:25 +02:00
parent c91f426af3
commit 67078fdc71
36 changed files with 233 additions and 248 deletions

View File

@@ -10,6 +10,7 @@ class Application extends Component
public ServiceApplication $application;
protected $rules = [
'application.human_name' => 'nullable',
'application.description' => 'nullable',
'application.fqdn' => 'nullable',
];
public function render()

View File

@@ -11,6 +11,7 @@ class Database extends Component
public ServiceDatabase $database;
protected $rules = [
'database.human_name' => 'nullable',
'database.description' => 'nullable',
];
public function render()
{

View File

@@ -2,11 +2,7 @@
namespace App\Http\Livewire\Project\Service;
use App\Actions\Service\StartService;
use App\Actions\Service\StopService;
use App\Jobs\ContainerStatusJob;
use App\Models\Service;
use Illuminate\Support\Collection;
use Livewire\Component;
class Index extends Component
@@ -18,6 +14,8 @@ class Index extends Component
protected $rules = [
'service.docker_compose_raw' => 'required',
'service.docker_compose' => 'required',
'service.name' => 'required',
'service.description' => 'required',
];
public function mount()
@@ -36,5 +34,13 @@ class Index extends Component
$this->service->refresh();
$this->emit('refreshEnvs');
}
public function submit() {
try {
$this->validate();
$this->service->save();
} catch (\Throwable $e) {
return handleError($e, $this);
}
}
}