Skip to content

Commit 320204d

Browse files
committed
fix: directory will be created by default for compose host mounts
1 parent b68199a commit 320204d

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

bootstrap/helpers/services.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ function getFilesystemVolumesFromServer(ServiceApplication|ServiceDatabase|Appli
7373
"echo '$content' | base64 -d | tee $fileLocation",
7474
], $server);
7575
} elseif ($isFile == 'NOK' && $isDir == 'NOK' && $fileVolume->is_directory && $isInit) {
76+
// Does not exists (no dir or file), flagged as directory, is init
77+
$fileVolume->content = null;
78+
$fileVolume->is_directory = true;
79+
$fileVolume->save();
80+
instant_remote_process(["mkdir -p $fileLocation"], $server);
81+
} elseif ($isFile == 'NOK' && $isDir == 'NOK' && ! $fileVolume->is_directory && $isInit && ! $content) {
82+
// Does not exists (no dir or file), not flagged as directory, is init, has no content => create directory
7683
$fileVolume->content = null;
7784
$fileVolume->is_directory = true;
7885
$fileVolume->save();

bootstrap/helpers/shared.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,6 +1735,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
17351735
if (is_array($volume)) {
17361736
return data_get($volume, 'source');
17371737
}
1738+
dispatch(new ServerFilesFromServerJob($resource));
17381739

17391740
return $volume->value();
17401741
});

resources/views/livewire/project/application/configuration.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
<livewire:project.shared.destination :resource="$application" :servers="$servers" />
107107
</div>
108108
<div x-cloak x-show="activeTab === 'storages'">
109-
<livewire:project.service.storage :resource="$application" />
109+
<livewire:project.service.storage :resource="$application" lazy />
110110
</div>
111111
<div x-cloak x-show="activeTab === 'webhooks'">
112112
<livewire:project.shared.webhooks :resource="$application" lazy />

0 commit comments

Comments
 (0)