Repository navigation
fix(docker): idle-exec with Podman support and enable cleanup by default - #97
Merged
Merged
Conversation
- Rename dockerSafeExec to dockerIdleExec and detect idle state via pgrep for both docker and podman processes - Replace cleanupAllBackground with void cleanupAll(...) and return a scheduled-status response from the clean-all settings mutation - Default enableDockerCleanup to true on the server table Carries drizzle migration 0190 (regenerated for the fork). Preserves the fork buildsConcurrency column on the server table and its test fixture. Ports Dokploy#4346 by @fir4tozden.
# Conflicts: # apps/dokploy/drizzle/meta/_journal.json
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.
Summary
Ports the upstream "docker cleanup" fix:
packages/server/src/utils/docker/utils.ts: renamesdockerSafeExec→dockerIdleExecand detects an idle host viapgrep -af "(docker|podman) [a-zA-Z]"(adds Podman support); consolidates the cleanup helpers (net −93 lines of duplication).apps/dokploy/server/api/routers/settings.ts: replacesawait cleanupAllBackground(serverId)withvoid cleanupAll(serverId)and returns a fixed{ status: "scheduled", message: ... }response from theclean-allmutation (avoids gateway timeouts).packages/server/src/db/schema/server.ts:enableDockerCleanupnow defaults totrue.update-server-config.test.ts) andschema.dbmlupdated for the new default.Ports Dokploy#4346 by @fir4tozden (authorship preserved via
--authoron a squashed apply of the 6-commit branch).Adaptations
buildsConcurrencycolumn on theservertable (and itsupdate-server-config.test.tsfixture). Upstream'senableDockerCleanupchange sits on the adjacent line; a blind apply would have droppedbuildsConcurrency.0190_docker_cleanup_default_on.sql=ALTER TABLE "server" ALTER COLUMN "enableDockerCleanup" SET DEFAULT true;). Upstream's PR shipped no migration for this default change. The fork'sweb-server-settingstable already defaultsenableDockerCleanuptotrue, so only theservertable needs the ALTER — the regenerated migration contains exactly that one statement.Merge-order note
Carries drizzle migration 0190. Merge after fork #11/#12 (slots 0175/0176) and after the sibling PRs holding slots 0177–0189; sibling migration PRs conflict trivially in
meta/_journal.json— keep both entries, idx-ordered. (My sibling slot 0189, the Dokploy#4070 port, needs no migration.) Sharesapps/dokploy/server/api/routers/settings.tsandpackages/server/src/utils/docker/utils.tswith any other docker-/log-cleanup ports in this wave — rebase-check whichever merges last.Verification
pnpm --filter=dokploy run typecheckpasses on this branch.dockerSafeExecorcleanupAllBackgroundreferences remain anywhere in the tree after the rename/removal.idx=190,when=1784013000000, LF endings, singleALTER COLUMN ... SET DEFAULTstatement.