diff --git a/CHANGELOG.md b/CHANGELOG.md index a4bec4ee52..d2a7a74d33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ### Fixed +- Do not copy the preview deployments of an application when you clone it. A clone of an application with a fixed preview URL template (for example `demo-mr-{{pr_id}}.example.com`) failed with a duplicate preview domain error and left a stopped, partial clone. The clone gets its own previews from new pull requests - Handle an existing Cloudflare DNS record with a different IP when Coolify adds the DNS record of a new domain automatically. Coolify now replaces the record when it created the record and no other resource uses it. Otherwise it opens the **Configure DNS** dialog, where you can replace the record, and the domain shows the conflict instead of "Not checked" - Add the Cloudflare DNS record automatically, or open the **Configure DNS** dialog, also when you edit a domain to a hostname in a connected Cloudflare zone, for example when you change a generated domain to your own domain. Before, Coolify did this only when you added a new domain. This applies to the **Domains** pages, the application and service application settings, and the service application API - Save deployments started through the MCP server as MCP deployments, not as API deployments. The deployment list shows them with the **MCP** source and filter, and the API and MCP deployment data have a new `is_mcp` field. The deployments to additional servers keep the source of the main deployment, and the audit log records actions that MCP tools do through the API as MCP events diff --git a/bootstrap/helpers/applications.php b/bootstrap/helpers/applications.php index a06020d5aa..2affdc15dd 100644 --- a/bootstrap/helpers/applications.php +++ b/bootstrap/helpers/applications.php @@ -513,29 +513,7 @@ function clone_application(Application $source, $destination, array $overrides = $newTask->save(); } - // Clone previews with FQDN regeneration - $applicationPreviews = $source->previews()->get(); - foreach ($applicationPreviews as $preview) { - $newPreview = $preview->replicate([ - 'id', - 'created_at', - 'updated_at', - ])->fill([ - 'uuid' => new_public_id(), - 'application_id' => $newApplication->id, - 'status' => 'exited', - 'fqdn' => null, - 'docker_compose_domains' => null, - ]); - $newPreview->save(); - - // Regenerate FQDN for the cloned preview - if ($newApplication->build_pack === 'dockercompose') { - $newPreview->generate_preview_fqdn_compose(); - } else { - $newPreview->generate_preview_fqdn(); - } - } + // Preview records belong to the pull request deployments of the source. The clone gets its own on the next pull request. // Clone persistent volumes $pendingVolumeClones = [];