feat: named resource profiles reusable across applications, databases and compose services - #5188
Open
gkissel wants to merge 2 commits into
Open
feat: named resource profiles reusable across applications, databases and compose services#5188gkissel wants to merge 2 commits into
gkissel wants to merge 2 commits into
Conversation
Add named resource profiles grouped at the organization level that can be linked to applications, databases and compose services instead of typing resource limits by hand on every service. - New resource_group and resource_profile tables plus a compose_service_resource_profile mapping table (migration 0186) - Applications, postgres, mysql, mariadb, mongo, redis and libsql get a resourceProfileId column; existing resource fields act as per-field overrides of the profile values - Effective values are resolved at deploy time in the same path as the previous static fields (builders, database builders and rollbacks) - Compose services can be assigned a profile with overrides; Dokploy injects deploy.resources.limits/reservations into the generated stack file and wins over resources defined in the compose file itself - New Settings > Resource Profiles section with CRUD for groups and profiles, usage counts and delete protection while in use - Resources tab shows a group/profile selector; inherited values appear as placeholders and each field can still be overridden Fixes Dokploy#5106
- Fix Radix Select controlled value race: remove onValueChange from group Select, use useRef-based effect to clear profile only on user-initiated group changes - Filter empty string from profile Select onValueChange (Radix fires on controlled value mismatch during re-render cascade) - Fix compose assignment endpoint missing authorization (Greptile review) - Add oneProfile tenant bypass for single-org setups (Greptile review) - Add findComposeServiceAssignmentById helper
gkissel
force-pushed
the
feat/resource-profiles
branch
from
August 27, 2026 17:21
9e58db2 to
87aa39d
Compare
Author
|
@Siumauricio Could you look at this pr when possible? Thank you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #5106
Description
Adds organization-level Resource Groups containing named Resource Profiles (the same 4 values already used by services today, in the same units/format), so resource sizing no longer has to be copy-pasted on every service and can be changed in one place.
What's included
Schema (migration 0186)
resource_group(org-scoped, unique name per org)resource_profile(belongs to a group; holds memoryReservation / memoryLimit / cpuReservation / cpuLimit, unique name per group)compose_service_resource_profile(per compose service assignment with per-field overrides)Applications & databases
resourceProfileIdcolumn onapplication,postgres,mysql,mariadb,mongo,redis,libsqlbuilders, database builders, rollbacks), applied on the next deploy/redeploy with no implicit restartsDocker Compose
deploy.resources.limits/reservationsinto the generated stack file; if the service already definesdeploy.resources, the Dokploy assignment wins and the UI shows a warning badgeSettings UI
Screenshots
Demo
https://github.com/gkissel/dokploy/releases/download/resource-profiles-screenshots/resource-profiles-demo.webm
Testing
Verified locally against a running dev instance:
resolveEffectiveResources: profile inheritance verified live (profile 1GB/0.5CPU → effective limits), override precedence verified (app-level 2GB memory wins over profile, remaining fields inherit)deploy.resources.limits.memory=1073741824+ overridecpus=0.75; unassigned service untouchedpnpm run typecheck, Biome lint/format clean, unit tests pass (the only failing tests are the pre-existing network-dependentapplication.real.test.tsclone tests, which fail identically on a clean canary checkout in this environment)