-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Is your feature request related to a problem?
When using "Push to Registry" with preview deployments enabled, the custom tag (e.g., latest) is applied to all builds - including preview deployments. This causes problems when using registry webhooks to trigger production deployments, as preview builds incorrectly trigger production deploys.
Evidence from Azure Container Registry:
Tags Digest Last modified
latest sha256:54ddf5d576def52e71e9128392f6c9d2d64c9f9b753e3351e9afbedbc8f32720 12/12/2025, 7:17 PM
pr-533 sha256:54ddf5d576def52e71e9128392f6c9d2d64c9f9b753e3351e9afbedbc8f32720 12/12/2025, 7:17 PM
Both latest and pr-533 have the same digest and timestamp - the preview deployment pushed both tags.
Describe the solution you'd like
Add an option to only apply the custom tag on builds from the main/production branch:
- "Apply tag only on main branch" checkbox in the Docker Registry settings
- Or: separate tag fields for "Main branch tag" vs "Preview deployment tag"
This would allow:
- Preview deployments: tagged with
pr-XXX+ commit SHA only - Main branch: tagged with commit SHA +
latest(or custom tag)
Describe alternatives you've considered
- Using GitHub Actions for builds instead of Coolify - Works but loses Coolify's native preview deployment features (auto-cleanup, PR comments, etc.)
- Creating separate Coolify resources for previews vs main - Duplicates configuration and is error-prone
- Not using registry push at all - Can't do multi-server deployments where a build server pushes to registry and production servers pull
Use case
Multi-server deployment architecture:
- Build VM runs Coolify, builds images, pushes to Azure Container Registry
- ACR webhooks (scoped to
image:latest) trigger production deployments on separate VMs - Preview deployments should NOT trigger production deploys
Without branch-conditional tagging, every preview build pushes latest and triggers all production webhooks.
Additional context
This is a common enterprise deployment pattern (build server → registry → multiple production servers) that Coolify currently doesn't support well due to this limitation.