feat: add Deploy with Fresh Volumes for Docker Compose#4195
Open
lamualfa wants to merge 2 commits intoDokploy:canaryfrom
Open
feat: add Deploy with Fresh Volumes for Docker Compose#4195lamualfa wants to merge 2 commits intoDokploy:canaryfrom
lamualfa wants to merge 2 commits intoDokploy:canaryfrom
Conversation
Adds a one-click option to redeploy Docker Compose services with clean volumes, removing the need to manually edit the run command. When triggered, it runs `docker compose down --volumes` before the standard deploy build step. The feature is only available for docker-compose type projects (not swarm stacks).
Consistent with the rest of the codebase where every docker compose invocation uses `env -i PATH="$PATH"` for a clean environment.
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
docker compose down --volumesbefore the standard deploy step, ensuring a clean statedocker-composetype projects (not swarm stacks)Closes #4194
Changes
Backend:
freshVolumesoptional boolean toapiDeployComposeandapiRedeployComposeAPI schemasfreshVolumestoDeploymentJobtype for queue propagationdeployCompose()andrebuildCompose()services to rundocker compose down --volumeswhenfreshVolumesis truefreshVolumesthrough the pipelineFrontend:
HardDriveDownloadicon in compose actionsdocker-composetype (hidden forstacktype)Test plan
docker compose down --volumesbefore the buildGreptile Summary
This PR adds a "Fresh Volumes" deploy button for
docker-composeprojects that runsdocker compose down --volumesbefore a full redeploy, giving users a clean-slate deployment option with a destructive confirmation guard. The feature is end-to-end wired correctly through the schema, queue types, worker, router, and UI, with appropriate backend enforcement (composeType === "docker-compose"check in the service layer).Confidence Score: 5/5
Safe to merge — only a minor stylistic inconsistency remains.
All findings are P2 (style/consistency). The one issue is that the new docker compose down --volumes commands omit the env -i PATH=$PATH prefix that every other docker compose invocation in the file uses, which is inconsistent but not a correctness or security problem. Logic, permissions, queue propagation, UI gating, and destructive-action confirmation are all correctly implemented.
packages/server/src/services/compose.ts — lines 272 and 398 should add env -i PATH=$PATH for consistency.
Reviews (1): Last reviewed commit: "feat: add "Deploy with Fresh Volumes" bu..." | Re-trigger Greptile
(2/5) Greptile learns from your feedback when you react with thumbs up/down!