fix(service): ensure configuration changes are properly tracked and dispatched

This commit is contained in:
Andras Bacsai 2025-07-03 15:08:13 +02:00
parent b181e5bb33
commit 13a9816770
3 changed files with 3 additions and 1 deletions

View file

@ -19,6 +19,7 @@ public function handle(Service $service, bool $pullLatestImages = false, bool $s
StopService::run(service: $service, dockerCleanup: false);
}
$service->saveComposeConfigs();
$service->isConfigurationChanged(save: true);
$commands[] = 'cd '.$service->workdir();
$commands[] = "echo 'Saved configuration files to {$service->workdir()}.'";
if ($pullLatestImages) {

View file

@ -63,7 +63,7 @@ public function serviceChecked()
$this->service->databases->each(function ($database) {
$database->refresh();
});
if (is_null($this->service->config_hash) || $this->service->isConfigurationChanged()) {
if (is_null($this->service->config_hash)) {
$this->service->isConfigurationChanged(true);
}
$this->dispatch('configurationChanged');

View file

@ -170,6 +170,7 @@ public function submit()
$this->syncData(true);
$this->dispatch('success', 'Environment variable updated.');
$this->dispatch('envsUpdated');
$this->dispatch('configurationChanged');
} catch (\Exception $e) {
return handleError($e);
}