fix: directory will be created by default for compose host mounts
This commit is contained in:
parent
b68199a482
commit
320204d854
@ -73,6 +73,13 @@ function getFilesystemVolumesFromServer(ServiceApplication|ServiceDatabase|Appli
|
|||||||
"echo '$content' | base64 -d | tee $fileLocation",
|
"echo '$content' | base64 -d | tee $fileLocation",
|
||||||
], $server);
|
], $server);
|
||||||
} elseif ($isFile == 'NOK' && $isDir == 'NOK' && $fileVolume->is_directory && $isInit) {
|
} elseif ($isFile == 'NOK' && $isDir == 'NOK' && $fileVolume->is_directory && $isInit) {
|
||||||
|
// Does not exists (no dir or file), flagged as directory, is init
|
||||||
|
$fileVolume->content = null;
|
||||||
|
$fileVolume->is_directory = true;
|
||||||
|
$fileVolume->save();
|
||||||
|
instant_remote_process(["mkdir -p $fileLocation"], $server);
|
||||||
|
} elseif ($isFile == 'NOK' && $isDir == 'NOK' && ! $fileVolume->is_directory && $isInit && ! $content) {
|
||||||
|
// Does not exists (no dir or file), not flagged as directory, is init, has no content => create directory
|
||||||
$fileVolume->content = null;
|
$fileVolume->content = null;
|
||||||
$fileVolume->is_directory = true;
|
$fileVolume->is_directory = true;
|
||||||
$fileVolume->save();
|
$fileVolume->save();
|
||||||
|
@ -1735,6 +1735,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
|||||||
if (is_array($volume)) {
|
if (is_array($volume)) {
|
||||||
return data_get($volume, 'source');
|
return data_get($volume, 'source');
|
||||||
}
|
}
|
||||||
|
dispatch(new ServerFilesFromServerJob($resource));
|
||||||
|
|
||||||
return $volume->value();
|
return $volume->value();
|
||||||
});
|
});
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
<livewire:project.shared.destination :resource="$application" :servers="$servers" />
|
<livewire:project.shared.destination :resource="$application" :servers="$servers" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'storages'">
|
<div x-cloak x-show="activeTab === 'storages'">
|
||||||
<livewire:project.service.storage :resource="$application" />
|
<livewire:project.service.storage :resource="$application" lazy />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'webhooks'">
|
<div x-cloak x-show="activeTab === 'webhooks'">
|
||||||
<livewire:project.shared.webhooks :resource="$application" lazy />
|
<livewire:project.shared.webhooks :resource="$application" lazy />
|
||||||
|
Loading…
Reference in New Issue
Block a user