An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
wip: services
Andras Bacsaic91f426af3be
diff --git a/app/Actions/Service/StartService.php b/app/Actions/Service/StartService.phpindex 1dbabc6a57..e82040e744 100644--- a/app/Actions/Service/StartService.php+++ b/app/Actions/Service/StartService.php@@ -11,7 +11,7 @@ class StartServicepublic function handle(Service $service){$workdir = service_configuration_dir() . "/{$service->uuid}";- $commands[] = "echo 'Starting service {$service->name} on {$service->server->name}'";+ $commands[] = "echo 'Starting service {$service->name} on {$service->server->name}.'";$commands[] = "mkdir -p $workdir";$commands[] = "cd $workdir";@@ -22,8 +22,11 @@ class StartServiceforeach ($envs as $env) {$commands[] = "echo '{$env->key}={$env->value}' >> .env";}+ $commands[] = "echo 'Pulling images and starting containers...'";$commands[] = "docker compose pull";$commands[] = "docker compose up -d";+ $commands[] = "echo 'Waiting for containers to start...'";+ $commands[] = "sleep 5";$commands[] = "docker network connect $service->uuid coolify-proxy 2>/dev/null || true";$activity = remote_process($commands, $service->server);return $activity;diff --git a/app/Http/Livewire/Project/New/DockerCompose.php b/app/Http/Livewire/Project/New/DockerCompose.phpindex 00faa48635..cfd6dbb86f 100644--- a/app/Http/Livewire/Project/New/DockerCompose.php+++ b/app/Http/Livewire/Project/New/DockerCompose.php@@ -2,20 +2,10 @@namespace App\Http\Livewire\Project\New;-use App\Models\Application;-use App\Models\EnvironmentVariable;-use App\Models\GithubApp;-use App\Models\LocalPersistentVolume;use App\Models\Project;use App\Models\Service;-use App\Models\ServiceApplication;-use App\Models\ServiceDatabase;-use App\Models\StandaloneDocker;-use App\Models\SwarmDocker;use Livewire\Component;-use Visus\Cuid2\Cuid2;use Illuminate\Support\Str;-use Symfony\Component\Yaml\Yaml;class DockerCompose extends Component{@@ -29,7 +19,7 @@ class DockerCompose extends Componentif (isDev()) {$this->dockercompose = 'services:ghost:- documentation: https://docs.ghost.org/docs/config+ documentation: https://ghost.org/docs/configimage: ghost:5volumes:- ghost-content-data:/var/lib/ghost/contentdiff --git a/app/Http/Livewire/Project/Service/Index.php b/app/Http/Livewire/Project/Service/Index.phpindex 8b70f369f8..5b23ec33c6 100644--- a/app/Http/Livewire/Project/Service/Index.php+++ b/app/Http/Livewire/Project/Service/Index.php@@ -33,6 +33,7 @@ class Index extends Componentpublic function save() {$this->service->save();$this->service->parse();+ $this->service->refresh();$this->emit('refreshEnvs');}diff --git a/app/Models/Service.php b/app/Models/Service.phpindex 4e585aca3e..1ae97aa08f 100644--- a/app/Models/Service.php+++ b/app/Models/Service.php@@ -98,6 +98,8 @@ class Service extends BaseModel$services = collect($services)->map(function ($service, $serviceName) use ($composeVolumes, $composeNetworks, $definedNetwork, $envs, $volumes, $ports, $isNew) {$container_name = "$serviceName-{$this->uuid}";$isDatabase = false;+ $serviceVariables = collect(data_get($service, 'environment', []));+// Decide if the service is a database$image = data_get($service, 'image');if ($image) {@@ -114,10 +116,15 @@ class Service extends BaseModel'service_id' => $this->id]);} else {- $defaultUsableFqdn = "http://$serviceName-{$this->uuid}.{$this->server->ip}.sslip.io";- if (isDev()) {- $defaultUsableFqdn = "http://$serviceName-{$this->uuid}.127.0.0.1.sslip.io";+ if (Str::of($serviceVariables)->contains('SERVICE_FQDN') || Str::of($serviceVariables)->contains('SERVICE_URL')) {+ $defaultUsableFqdn = "http://$serviceName-{$this->uuid}.{$this->server->ip}.sslip.io";+ if (isDev()) {+ $defaultUsableFqdn = "http://$serviceName-{$this->uuid}.127.0.0.1.sslip.io";+ }+ } else {+ $defaultUsableFqdn = null;}+$savedService = ServiceApplication::create(['name' => $serviceName,'fqdn' => $defaultUsableFqdn,@@ -129,6 +136,16 @@ class Service extends BaseModel$savedService = $this->databases()->whereName($serviceName)->first();} else {$savedService = $this->applications()->whereName($serviceName)->first();+ if (Str::of($serviceVariables)->contains('SERVICE_FQDN') || Str::of($serviceVariables)->contains('SERVICE_URL')) {+ $defaultUsableFqdn = "http://$serviceName-{$this->uuid}.{$this->server->ip}.sslip.io";+ if (isDev()) {+ $defaultUsableFqdn = "http://$serviceName-{$this->uuid}.127.0.0.1.sslip.io";+ }+ } else {+ $defaultUsableFqdn = null;+ }+ $savedService->fqdn = $defaultUsableFqdn;+ $savedService->save();}}$fqdn = data_get($savedService, 'fqdn');@@ -155,6 +172,7 @@ class Service extends BaseModel// Collect volumes$serviceVolumes = collect(data_get($service, 'volumes', []));if ($serviceVolumes->count() > 0) {+ LocalPersistentVolume::whereResourceId($savedService->id)->whereResourceType(get_class($savedService))->delete();foreach ($serviceVolumes as $volume) {if (is_string($volume)) {$volumeName = Str::before($volume, ':');@@ -189,7 +207,7 @@ class Service extends BaseModel$composeVolumes->put($volumeName, null);LocalPersistentVolume::updateOrCreate([- 'mount_path' => $volumePath,+ 'name' => $volumeName,'resource_id' => $savedService->id,'resource_type' => get_class($savedService)],@@ -234,7 +252,6 @@ class Service extends BaseModel// Get variables from the service- $serviceVariables = collect(data_get($service, 'environment', []));foreach ($serviceVariables as $variable) {$value = Str::after($variable, '=');if (!Str::startsWith($value, '$SERVICE_') && !Str::startsWith($value, '${SERVICE_') && Str::startsWith($value, '$')) {diff --git a/app/Models/ServiceApplication.php b/app/Models/ServiceApplication.phpindex 79b96c0b29..4910580821 100644--- a/app/Models/ServiceApplication.php+++ b/app/Models/ServiceApplication.php@@ -4,6 +4,7 @@ namespace App\Models;use Illuminate\Database\Eloquent\Casts\Attribute;use Illuminate\Database\Eloquent\Factories\HasFactory;+use Symfony\Component\Yaml\Yaml;class ServiceApplication extends BaseModel{@@ -14,6 +15,14 @@ class ServiceApplication extends BaseModel{return 'service';}+ public function documentation()+ {+ return data_get(Yaml::parse($this->service->docker_compose_raw), "services.{$this->name}.documentation", 'https://coolify.io/docs');+ }+ public function service()+ {+ return $this->belongsTo(Service::class);+ }public function persistentStorages(){return $this->morphMany(LocalPersistentVolume::class, 'resource');diff --git a/app/Models/ServiceDatabase.php b/app/Models/ServiceDatabase.phpindex dc0d857425..e01374ea6b 100644--- a/app/Models/ServiceDatabase.php+++ b/app/Models/ServiceDatabase.php@@ -3,6 +3,7 @@namespace App\Models;use Illuminate\Database\Eloquent\Factories\HasFactory;+use Symfony\Component\Yaml\Yaml;class ServiceDatabase extends BaseModel{@@ -13,6 +14,14 @@ class ServiceDatabase extends BaseModel{return 'service';}+ public function documentation()+ {+ return data_get(Yaml::parse($this->service->docker_compose_raw), "services.{$this->name}.documentation", 'https://coolify.io/docs');+ }+ public function service()+ {+ return $this->belongsTo(Service::class);+ }public function persistentStorages(){return $this->morphMany(LocalPersistentVolume::class, 'resource');diff --git a/app/View/Components/Services/Explanation.php b/app/View/Components/Services/Explanation.phpnew file mode 100644index 0000000000..a2242d0e10--- /dev/null+++ b/app/View/Components/Services/Explanation.php@@ -0,0 +1,26 @@+<?php++namespace App\View\Components\Services;++use Closure;+use Illuminate\Contracts\View\View;+use Illuminate\View\Component;++class Explanation extends Component+{+ /**+ * Create a new component instance.+ */+ public function __construct()+ {+ //+ }++ /**+ * Get the view / contents that represent the component.+ */+ public function render(): View|Closure|string+ {+ return view('components.services.explanation');+ }+}diff --git a/bootstrap/helpers/services.php b/bootstrap/helpers/services.phpindex 5e50d96bc5..d7275b2f68 100644--- a/bootstrap/helpers/services.php+++ b/bootstrap/helpers/services.php@@ -1,200 +1,6 @@<?php-use App\Enums\ProxyTypes;-use App\Models\Application;use App\Models\Service;-use Symfony\Component\Yaml\Yaml;-use Illuminate\Support\Str;--# Application generated variables-# SERVICE_FQDN_*: FQDN coming from your application (https://coolify.io)-# SERVICE_URL_*: URL coming from your application (coolify.io)-# SERVICE_USER_*: Generated by your application, username (not encrypted)-# SERVICE_PASSWORD_*: Generated by your application, password (encrypted)---// function generateServiceFromTemplate(Service $service)-// {-// // ray()->clearAll();-// $template = data_get($service, 'docker_compose_raw');-// $network = data_get($service, 'destination.network');-// $yaml = Yaml::parse($template);--// $services = $service->parse();-// $volumes = collect(data_get($yaml, 'volumes', []));-// $composeVolumes = collect([]);-// $env = collect([]);-// $ports = collect([]);--// foreach ($services as $serviceName => $service) {-// $container_name = generateApplicationContainerName($application);-// $domain = data_get($application, "service_configurations.{$serviceName}.fqdn", null);-// if ($domain === '') {-// $domain = null;-// }-// data_forget($service, 'documentation');-// // Some default things-// data_set($service, 'restart', RESTART_MODE);-// data_set($service, 'container_name', $container_name);-// $healthcheck = data_get($service, 'healthcheck');-// if (is_null($healthcheck)) {-// $healthcheck = [-// 'test' => [-// 'CMD-SHELL',-// 'exit 0'-// ],-// 'interval' => $application->health_check_interval . 's',-// 'timeout' => $application->health_check_timeout . 's',-// 'retries' => $application->health_check_retries,-// 'start_period' => $application->health_check_start_period . 's'-// ];-// data_set($service, 'healthcheck', $healthcheck);-// }-// // Labels-// $server = data_get($application, 'destination.server');-// if ($server->proxyType() === ProxyTypes::TRAEFIK_V2->value) {-// $labels = collect(data_get($service, 'labels', []));-// $labels = collect([]);-// $labels = $labels->merge(defaultLabels($application->id, $container_name));-// if (!data_get($service, 'is_database')) {-// if ($domain) {-// $labels = $labels->merge(fqdnLabelsForTraefik($domain, $container_name, $application->settings->is_force_https_enabled));-// }--// }-// data_set($service, 'labels', $labels->toArray());-// }--// data_forget($service, 'is_database');--// // Add volumes to the volumes collection if they don't already exist-// $serviceVolumes = collect(data_get($service, 'volumes', []));-// if ($serviceVolumes->count() > 0) {-// foreach ($serviceVolumes as $volume) {-// $volumeName = Str::before($volume, ':');-// $volumePath = Str::after($volume, ':');-// if (Str::startsWith($volumeName, '/')) {-// continue;-// }-// $volumeExists = $volumes->contains(function ($_, $key) use ($volumeName) {-// return $key == $volumeName;-// });-// if ($volumeExists) {-// ray('Volume already exists');-// } else {-// $composeVolumes->put($volumeName, null);-// $volumes->put($volumeName, $volumePath);-// }-// }-// }-// // Add networks to the networks collection if they don't already exist-// $serviceNetworks = collect(data_get($service, 'networks', []));-// $networkExists = $serviceNetworks->contains(function ($_, $key) use ($network) {-// return $key == $network;-// });-// if (is_null($networkExists) || !$networkExists) {-// $serviceNetworks->push($network);-// }-// data_set($service, 'networks', $serviceNetworks->toArray());-// data_set($yaml, "services.{$serviceName}", $service);--// // Get variables from the service that does not start with SERVICE_*-// $serviceVariables = collect(data_get($service, 'environment', []));-// foreach ($serviceVariables as $variable) {-// // $key = Str::before($variable, '=');-// $value = Str::after($variable, '=');-// if (!Str::startsWith($value, '$SERVICE_') && !Str::startsWith($value, '${SERVICE_') && Str::startsWith($value, '$')) {-// if (Str::of($value)->contains(':')) {-// $nakedName = replaceVariables(Str::of($value)->before(':'));-// $nakedValue = replaceVariables(Str::of($value)->after(':'));-// }-// if (Str::of($value)->contains('-')) {-// $nakedName = replaceVariables(Str::of($value)->before('-'));-// $nakedValue = replaceVariables(Str::of($value)->after('-'));-// }-// if (Str::of($value)->contains('+')) {-// $nakedName = replaceVariables(Str::of($value)->before('+'));-// $nakedValue = replaceVariables(Str::of($value)->after('+'));-// }-// if ($nakedValue->startsWith('-')) {-// $nakedValue = Str::of($nakedValue)->after('-');-// }-// if ($nakedValue->startsWith('+')) {-// $nakedValue = Str::of($nakedValue)->after('+');-// }-// if (!$env->contains("{$nakedName->value()}={$nakedValue->value()}")) {-// $env->push("$nakedName=$nakedValue");-// }-// }-// }-// // Get ports from the service-// $servicePorts = collect(data_get($service, 'ports', []));-// foreach ($servicePorts as $port) {-// $port = Str::of($port)->before(':');-// $ports->push($port);-// }-// }-// data_set($yaml, 'networks', [-// $network => [-// 'name' => $network-// ],-// ]);-// data_set($yaml, 'volumes', $composeVolumes->toArray());-// $compose = Str::of(Yaml::dump($yaml, 10, 2));--// // Replace SERVICE_FQDN_* with the actual FQDN-// preg_match_all(collectRegex('SERVICE_FQDN_'), $compose, $fqdns);-// $fqdns = collect($fqdns)->flatten()->unique()->values();-// $generatedFqdns = collect([]);-// foreach ($fqdns as $fqdn) {-// $generatedFqdns->put("$fqdn", data_get($application, 'fqdn'));-// }--// // Replace SERVICE_URL_*-// preg_match_all(collectRegex('SERVICE_URL_'), $compose, $urls);-// $urls = collect($urls)->flatten()->unique()->values();-// $generatedUrls = collect([]);-// foreach ($urls as $url) {-// $generatedUrls->put("$url", data_get($application, 'url'));-// }--// // Generate SERVICE_USER_*-// preg_match_all(collectRegex('SERVICE_USER_'), $compose, $users);-// $users = collect($users)->flatten()->unique()->values();-// $generatedUsers = collect([]);-// foreach ($users as $user) {-// $generatedUsers->put("$user", Str::random(10));-// }--// // Generate SERVICE_PASSWORD_*-// preg_match_all(collectRegex('SERVICE_PASSWORD_'), $compose, $passwords);-// $passwords = collect($passwords)->flatten()->unique()->values();-// $generatedPasswords = collect([]);-// foreach ($passwords as $password) {-// $generatedPasswords->put("$password", Str::password(symbols: false));-// }--// // Save .env file-// foreach ($generatedFqdns as $key => $value) {-// $env->push("$key=$value");-// }-// foreach ($generatedUrls as $key => $value) {-// $env->push("$key=$value");-// }-// foreach ($generatedUsers as $key => $value) {-// $env->push("$key=$value");-// }-// foreach ($generatedPasswords as $key => $value) {-// $env->push("$key=$value");-// }-// return [-// 'dockercompose' => $compose,-// 'yaml' => Yaml::parse($compose),-// 'envs' => $env,-// 'volumes' => $volumes,-// 'ports' => $ports->values(),-// ];-// }function replaceRegex(?string $name = null){diff --git a/examples/docker-compose-ghost.yaml b/examples/docker-compose-ghost.yamlindex 9ed0c360e7..a5db1e2bdf 100644--- a/examples/docker-compose-ghost.yaml+++ b/examples/docker-compose-ghost.yaml@@ -1,6 +1,6 @@services:ghost:- documentation: https://docs.ghost.org/docs/config+ documentation: https://ghost.org/docs/configimage: ghost:5volumes:- ghost-content-data:/var/lib/ghost/contentdiff --git a/resources/views/components/services/explanation.blade.php b/resources/views/components/services/explanation.blade.phpnew file mode 100644index 0000000000..7f8cdbc8c1--- /dev/null+++ b/resources/views/components/services/explanation.blade.php@@ -0,0 +1,8 @@+<pre class="py-2 pb-4">+# You can use these variables in your Docker Compose file and Coolify will generate default values or replace them with the values you set on the UI forms.+#+# SERVICE_FQDN_*: FQDN - could be changable from the UI. (example: SERVICE_FQDN_GHOST)+# SERVICE_URL_*: URL parsed from FQDN - could be changable from the UI. (example: SERVICE_URL_GHOST)+# SERVICE_USER_*: Generated user, not encrypted in database (example: SERVICE_USER_MYSQL)+# SERVICE_PASSWORD_*: Generated password, encrypted in database (example: SERVICE_PASSWORD_MYSQL)+</pre>diff --git a/resources/views/livewire/project/new/docker-compose.blade.php b/resources/views/livewire/project/new/docker-compose.blade.phpindex d6ec91a41e..c9823c438c 100644--- a/resources/views/livewire/project/new/docker-compose.blade.php+++ b/resources/views/livewire/project/new/docker-compose.blade.php@@ -4,22 +4,13 @@<form wire:submit.prevent="submit"><div class="flex gap-2 pb-1"><h2>Docker Compose</h2>--<x-forms.button type="submit">Save</x-forms.button></div>- <pre>-# Application generated variables-# You can use these variables in your docker-compose.yml file and Coolify will create default values or replace them with the values you set in the application creation form.-# SERVICE_FQDN_*: FQDN coming from your application (https://coolify.io)-# SERVICE_URL_*: URL coming from your application (coolify.io)-# SERVICE_USER_*: Generated by your application, username (not encrypted)-# SERVICE_PASSWORD_*: Generated by your application, password (encrypted)- </pre>+ <x-services.explanation /><x-forms.textarea rows="20" id="dockercompose"placeholder='services:ghost:- documentation: https://docs.ghost.org/docs/config+ documentation: https://ghost.org/docs/configimage: ghost:5volumes:- ghost-content-data:/var/lib/ghost/contentdiff --git a/resources/views/livewire/project/new/select.blade.php b/resources/views/livewire/project/new/select.blade.phpindex 79f9390b28..d9a24ffc7e 100644--- a/resources/views/livewire/project/new/select.blade.php+++ b/resources/views/livewire/project/new/select.blade.php@@ -4,7 +4,7 @@<div class="flex flex-col gap-2 pt-10">@if ($current_step === 'type')<ul class="pb-10 steps">- <li class="step step-secondary">Select Source Type</li>+ <li class="step step-secondary">Select Resource Type</li><li class="step">Select a Server</li><li class="step">Select a Destination</li></ul>@@ -95,7 +95,7 @@@endif@if ($current_step === 'servers')<ul class="pb-10 steps">- <li class="step step-secondary">Select Source Type</li>+ <li class="step step-secondary">Select Resource Type</li><li class="step step-secondary">Select a Server</li><li class="step">Select a Destination</li></ul>@@ -123,7 +123,7 @@@endif@if ($current_step === 'destinations')<ul class="pb-10 steps">- <li class="step step-secondary">Select Source Type</li>+ <li class="step step-secondary">Select Resource Type</li><li class="step step-secondary">Select a Server</li><li class="step step-secondary">Select a Destination</li></ul>diff --git a/resources/views/livewire/project/service/application.blade.php b/resources/views/livewire/project/service/application.blade.phpindex b7e0a62ffd..2c098c1c88 100644--- a/resources/views/livewire/project/service/application.blade.php+++ b/resources/views/livewire/project/service/application.blade.php@@ -1,14 +1,17 @@<form wire:submit.prevent='submit'>- <div class="flex gap-2 pb-4">+ <div class="flex items-center gap-2 pb-4">@if ($application->human_name)<h2>{{ Str::headline($application->human_name) }}</h2>@else<h2>{{ Str::headline($application->name) }}</h2>@endif<x-forms.button type="submit">Save</x-forms.button>+ <a target="_blank" href="{{ $application->documentation() }}">Documentation <x-external-link /></a></div><div class="flex gap-2"><x-forms.input label="Name" id="application.human_name" placeholder="Name"></x-forms.input>- <x-forms.input label="FQDN" required id="application.fqdn"></x-forms.input>- </div>+ @if (isset($application->fqdn))+ <x-forms.input label="FQDN" required id="application.fqdn"></x-forms.input>+ @endisset+</div></form>diff --git a/resources/views/livewire/project/service/database.blade.php b/resources/views/livewire/project/service/database.blade.phpindex 16f49743c8..f01f2bd26c 100644--- a/resources/views/livewire/project/service/database.blade.php+++ b/resources/views/livewire/project/service/database.blade.php@@ -1,11 +1,12 @@<form wire:submit.prevent='submit'>- <div class="flex gap-2 pb-4">+ <div class="flex items-center gap-2 pb-4">@if ($database->human_name)<h2>{{ Str::headline($database->human_name) }}</h2>@else<h2>{{ Str::headline($database->name) }}</h2>@endif<x-forms.button type="submit">Save</x-forms.button>+ <a target="_blank" href="{{ $database->documentation() }}">Documentation <x-external-link /></a></div><div class="flex gap-2"><x-forms.input label="Name" id="database.human_name" placeholder="Name"></x-forms.input>diff --git a/resources/views/livewire/project/service/index.blade.php b/resources/views/livewire/project/service/index.blade.phpindex cef5d93706..542d27c11a 100644--- a/resources/views/livewire/project/service/index.blade.php+++ b/resources/views/livewire/project/service/index.blade.php@@ -2,10 +2,11 @@<livewire:project.service.navbar :service="$service" :parameters="$parameters" :query="$query" /><div class="flex h-full pt-6"><div class="flex flex-col gap-4 min-w-fit">- <a :class="activeTab === 'service-stack' && 'text-white'"- @click.prevent="activeTab = 'service-stack'; window.location.hash = 'service-stack'" href="#">Service Stack</a>- <a :class="activeTab === 'compose' && 'text-white'"+ <a :class="activeTab === 'compose' && 'text-white'"@click.prevent="activeTab = 'compose'; window.location.hash = 'compose'" href="#">Compose File</a>+ <a :class="activeTab === 'service-stack' && 'text-white'"+ @click.prevent="activeTab = 'service-stack'; window.location.hash = 'service-stack'"+ href="#">Service Stack</a><a :class="activeTab === 'environment-variables' && 'text-white'"@click.prevent="activeTab = 'environment-variables'; window.location.hash = 'environment-variables'"href="#">Environment@@ -57,11 +58,14 @@</div></div>+ <x-services.explanation />+<div x-cloak x-show="raw"><x-forms.textarea rows="20" id="service.docker_compose_raw"></x-forms.textarea></div><div x-cloak x-show="raw === false">+<x-forms.textarea readonly rows="20" id="service.docker_compose"></x-forms.textarea></div>diff --git a/resources/views/livewire/project/shared/storages/show.blade.php b/resources/views/livewire/project/shared/storages/show.blade.phpindex 23714d74df..5ee4efd334 100644--- a/resources/views/livewire/project/shared/storages/show.blade.php+++ b/resources/views/livewire/project/shared/storages/show.blade.php@@ -7,21 +7,14 @@</x-slot:modalBody></x-modal>@if ($isReadOnly)- <span class="text-warning">Please modify storage layout in your Compose file.</span>+ <span class="text-warning">Please modify storage layout in your <a+ class="underline" href="{{ Str::of(url()->current())->beforeLast('/') }}#compose">Docker Compose</a> file.</span>@endif<form wire:submit.prevent='submit' class="flex flex-col gap-2 pt-4 xl:items-end xl:flex-row">@if ($isReadOnly)<x-forms.input id="storage.name" label="Name" required readonly /><x-forms.input id="storage.host_path" label="Source Path" readonly /><x-forms.input id="storage.mount_path" label="Destination Path" required readonly />- <div class="flex gap-2">- <x-forms.button type="submit" disabled>- Update- </x-forms.button>- <x-forms.button isError isModal modalId="{{ $modalId }}">- Delete- </x-forms.button>- </div>@else<x-forms.input id="storage.name" label="Name" required /><x-forms.input id="storage.host_path" label="Source Path" />