fix(previews): refine preview domain generation for Docker Compose applications, ensuring correct method usage based on build pack type
This commit is contained in:
@@ -229,7 +229,16 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
|
||||
// Set preview fqdn
|
||||
if ($this->pull_request_id !== 0) {
|
||||
if ($this->application->build_pack === 'dockercompose') {
|
||||
// For Docker Compose apps, use the preview model's compose-specific method
|
||||
$this->preview = ApplicationPreview::findPreviewByApplicationAndPullId($this->application->id, $this->pull_request_id);
|
||||
if ($this->preview) {
|
||||
$this->preview->generate_preview_fqdn_compose();
|
||||
}
|
||||
} else {
|
||||
// For non-Docker Compose apps, use the application model's method
|
||||
$this->preview = $this->application->generate_preview_fqdn($this->pull_request_id);
|
||||
}
|
||||
if ($this->application->is_github_based()) {
|
||||
ApplicationPullRequestUpdateJob::dispatch(application: $this->application, preview: $this->preview, deployment_uuid: $this->deployment_uuid, status: ProcessStatus::IN_PROGRESS);
|
||||
}
|
||||
|
Reference in New Issue
Block a user