diff --git a/app/Http/Livewire/Project/Application/Advanced.php b/app/Http/Livewire/Project/Application/Advanced.php index 552a3873a..656c55717 100644 --- a/app/Http/Livewire/Project/Application/Advanced.php +++ b/app/Http/Livewire/Project/Application/Advanced.php @@ -23,7 +23,7 @@ class Advanced extends Component ]; public function instantSave() { - if ($this->application->settings->is_log_drain_enabled) { + if ($this->application->isLogDrainEnabled()) { if (!$this->application->destination->server->isLogDrainEnabled()) { $this->application->settings->is_log_drain_enabled = false; $this->emit('error', 'Log drain is not enabled on this server.'); diff --git a/app/Http/Livewire/Project/Service/Application.php b/app/Http/Livewire/Project/Service/Application.php index 8a785b9c6..14fd3d5ab 100644 --- a/app/Http/Livewire/Project/Service/Application.php +++ b/app/Http/Livewire/Project/Service/Application.php @@ -28,7 +28,12 @@ public function instantSave() } public function instantSaveAdvanced() { - $this->submit(); + if (!$this->application->service->destination->server->isLogDrainEnabled()) { + $this->application->is_log_drain_enabled = false; + $this->emit('error', 'Log drain is not enabled on the server. Please enable it first.'); + return; + } + $this->application->save(); $this->emit('success', 'You need to restart the service for the changes to take effect.'); } public function delete() @@ -49,11 +54,6 @@ public function submit() { try { $this->validate(); - if (!$this->application->service->destination->server->isLogDrainEnabled()) { - $this->application->is_log_drain_enabled = false; - $this->emit('error', 'Log drain is not enabled on the server. Please enable it first.'); - return; - } $this->application->save(); updateCompose($this->application); $this->emit('success', 'Application saved successfully.'); diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index 77c8bd13f..1dcd51b22 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -219,7 +219,7 @@ public function handle(): void if ($this->server->isProxyShouldRun()) { dispatch(new ContainerStatusJob($this->server)); } - if ($this->application->docker_registry_image_name) { + if ($this->application->docker_registry_image_name && $this->application->build_pack !== 'dockerimage') { $this->push_to_docker_registry(); } $this->next(ApplicationDeploymentStatus::FINISHED->value);