feat: Add patches functionality #3574
Open
+31,975
−20,005
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this PR about?
This PR introduces a new Patches system for Applications and Docker Compose services — a powerful way to customize deployments directly from the dashboard without maintaining complex forks.
While there are many "ready-to-work" repositories available, most require slight modifications to run correctly on a self-hosted instance. This feature dramatically improves the user experience by making it easy to apply small, persistent fixes to any service.
How It Works:
Users can apply persistent modifications (Git patches) to source code or configuration files (like
docker-compose.yml) directly from the Dokploy UI. These patches are automatically applied before every build or deployment.Key Features:
git applymechanics; if the source file changes drastically, the patch fails safely, preventing silent breakages.Implementation Details:
Patchentity and aPatchServiceto handle git operations (clone, diff, apply).I understand that the UI/UX and test coverage are open points for discussion. If you are open to including this feature in the product, I am ready to polish it further based on your feedback.
You can preview the implementation here: https://github.com/ivanpadavan/dokploy-patches
Checklist
Before submitting this PR, please make sure that:
canarybranch.Issues related (if applicable)
(If there is a feature request issue for this, link it here, e.g. closes #123)
Screenshots
Patches Tab (Empty State)

Creating/Editing a Patch

Patches List
