-
-
Notifications
You must be signed in to change notification settings - Fork 568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: option to delete docker volumes on service deletion #886
feat: option to delete docker volumes on service deletion #886
Conversation
I think this only applies to docker compose |
Kinda, I was thinking about making a query that goes through the volumes and deletes the ones that have the same name than the app you want to delete. It's a bit hacky but might do the job. |
…nto feature/delete-docker-volumes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
I dont know why but I just saw that the PR i made for the biomejs settings somehow did not ended in the canary branch :c I'll revise to avoid having this many liniting issues. Also saw on a different PR that formating marked 4k+ lines as new :D |
Or maybe an idea would be to use sth like husky pre commit hooks ? |
This pull request introduces a new feature that allows users to delete volumes associated with a compose when deleting the compose itself. The changes span across multiple files to implement this functionality.
Key changes include:
Frontend Changes:
apps/dokploy/components/dashboard/compose/delete-compose.tsx
: Added a checkbox to the delete compose form to allow users to specify if they want to delete volumes associated with the compose. Updated form schema and submission logic to handle this new checkbox. [1] [2] [3] [4] [5]Backend Changes:
apps/dokploy/server/api/routers/compose.ts
: Updated the API to accept thedeleteVolumes
parameter and pass it through to the backend logic. [1] [2] [3]packages/server/src/db/schema/compose.ts
: Added a new schemaapiDeleteCompose
to validate thedeleteVolumes
parameter.packages/server/src/services/compose.ts
: Modified theremoveCompose
function to handle thedeleteVolumes
parameter and execute the appropriate Docker commands to remove volumes if specified. [1] [2]Pending Changes