feat(compose-preview): populate fqdn from docker_compose_domains

The generate_preview_fqdn_compose method now extracts and populates the fqdn field from docker_compose_domains, making it available for webhook notifications. This handles multiple domains across services and gracefully sets fqdn to null when no domains are configured.
This commit is contained in:
Andras Bacsai
2026-03-13 17:02:05 +01:00
parent d5b3a0380c
commit c39a287b47
2 changed files with 87 additions and 0 deletions
+10
View File
@@ -166,6 +166,16 @@ class ApplicationPreview extends BaseModel
}
$this->docker_compose_domains = json_encode($docker_compose_domains);
// Populate fqdn from generated domains so webhook notifications can read it
$allDomains = collect($docker_compose_domains)
->pluck('domain')
->filter(fn ($d) => ! empty($d))
->flatMap(fn ($d) => explode(',', $d))
->implode(',');
$this->fqdn = ! empty($allDomains) ? $allDomains : null;
$this->save();
}
}