Skip to content

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.

fix: volume detection (dir or file) is fixed

Andras Bacsai810488b1153f
diff --git a/app/Models/LocalFileVolume.php b/app/Models/LocalFileVolume.php
index 62ee4c45ca..0b9491da6f 100644
--- a/app/Models/LocalFileVolume.php
+++ b/app/Models/LocalFileVolume.php
@@ -79,8 +79,12 @@ class LocalFileVolume extends BaseModel
$isFile = instant_remote_process(["test -f $path && echo OK || echo NOK"], $server);
$isDir = instant_remote_process(["test -d $path && echo OK || echo NOK"], $server);
if ($isFile == 'OK' && $fileVolume->is_directory) {
+ $fileVolume->is_directory = false;
+ $fileVolume->save();
throw new \Exception('The following file is a file on the server, but you are trying to mark it as a directory. Please delete the file on the server or mark it as directory.');
} elseif ($isDir == 'OK' && ! $fileVolume->is_directory) {
+ $fileVolume->is_directory = true;
+ $fileVolume->save();
throw new \Exception('The following file is a directory on the server, but you are trying to mark it as a file. <br><br>Please delete the directory on the server or mark it as directory.');
}
if (! $fileVolume->is_directory && $isDir == 'NOK') {
diff --git a/resources/views/livewire/project/service/configuration.blade.php b/resources/views/livewire/project/service/configuration.blade.php
index ee627c56bb..d65c20f885 100644
--- a/resources/views/livewire/project/service/configuration.blade.php
+++ b/resources/views/livewire/project/service/configuration.blade.php
@@ -175,15 +175,15 @@
<div class="pb-4 dark:text-warning text-coollabs">If you would like to add a volume, you must add it to
your compose file (General tab).</div>
@foreach ($applications as $application)
- <livewire:project.service.storage wire:key="application-{{ $application->id }}"
- :resource="$application" />
+ <livewire:project.service.storage wire:key="application-{{ $application->id }}" :resource="$application"
+ lazy />
@endforeach
@foreach ($databases as $database)
- <livewire:project.service.storage wire:key="database-{{ $database->id }}" :resource="$database" />
+ <livewire:project.service.storage wire:key="database-{{ $database->id }}" :resource="$database" lazy />
@endforeach
</div>
<div x-cloak x-show="activeTab === 'scheduled-tasks'">
- <livewire:project.shared.scheduled-task.all :resource="$service" />
+ <livewire:project.shared.scheduled-task.all :resource="$service" lazy />
</div>
<div x-cloak x-show="activeTab === 'webhooks'">
<livewire:project.shared.webhooks :resource="$service" />