feat: Add lazy loading for images in General.php and improve Docker Compose file handling in Application.php

This commit is contained in:
Andras Bacsai 2024-05-06 13:03:55 +02:00
parent 6b4987bf39
commit eb41e023c7
2 changed files with 5 additions and 2 deletions

View File

@ -298,7 +298,10 @@ public function submit($showToaster = true)
}
if ($this->application->build_pack === 'dockercompose' && $this->initialDockerComposeLocation !== $this->application->docker_compose_location) {
$this->loadComposeFile();
$compose_return = $this->loadComposeFile();
if ($compose_return instanceof \Livewire\Features\SupportEvents\Event) {
return;
}
}
$this->validate();
if ($this->ports_exposes !== $this->application->ports_exposes) {

View File

@ -847,7 +847,7 @@ function loadComposeFile($isInit = false)
if (!$composeFileContent) {
$this->docker_compose_location = $initialDockerComposeLocation;
$this->save();
throw new \RuntimeException("Could not load base compose file from $workdir$composeFile");
throw new \RuntimeException("Docker Compose file not found at: $workdir$composeFile");
} else {
$this->docker_compose_raw = $composeFileContent;
$this->save();