-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(service/compose): display and edit docker-compose.yml volumes in UI #3344
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
base: canary
Are you sure you want to change the base?
Conversation
Previously, the Volumes panel only showed mounts stored in the database, displaying "No volumes/mounts configured" even when volumes were defined in docker-compose.yml. This change keeps docker-compose.yml the single source of truth for compose volume configuration, but also exposes them and makes them editable in the UI under their existing Volumes component in the “Advanced” tab. Changes: - Add extractServiceVolumes() to parse volumes from ComposeSpecification - Add addVolumeToService() and removeVolumeFromService() for YAML mutation - Add getComposeVolumes, addComposeVolume, removeComposeVolume API endpoints - Update loadServices and getComposeVolumes to read from DB for raw sourceType - Display YAML volumes in ShowVolumes with edit/delete actions - Enable bind/volume mount creation for raw compose services - Add UpdateComposeVolume component using existing ServiceVolume type For sourceType "raw": volumes are editable via UI, modifying compose.composeFile. For git sourceTypes: volumes display as read-only (grayed out). File mounts continue using database storage for all sourceTypes.
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.
Pull request overview
This PR adds UI support for displaying and editing docker-compose.yml volumes, maintaining docker-compose.yml as the single source of truth while exposing volume configuration in the existing Volumes component under the Advanced tab.
Key changes:
- Added backend utility functions to extract, add, and remove volumes from docker-compose.yml
- Created new API endpoints for managing compose volumes (get, add, remove)
- Enhanced UI to display both database-stored mounts and YAML-defined volumes with edit capabilities
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
packages/server/src/utils/docker/compose/volume.ts |
Added utility functions for extracting service volumes, adding volumes to services, and removing volumes from services |
apps/dokploy/server/api/routers/compose.ts |
Implemented three new endpoints: getComposeVolumes, addComposeVolume, and removeComposeVolume to manage compose file volumes |
apps/dokploy/components/dashboard/application/advanced/volumes/update-compose-volume.tsx |
New component for editing existing compose volumes with source/target inputs |
apps/dokploy/components/dashboard/application/advanced/volumes/show-volumes.tsx |
Updated to display both DB mounts and YAML volumes, with conditional editing based on sourceType |
apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx |
Enhanced to support adding volumes for raw compose files with service selection |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What is this PR about?
Previously, the Volumes panel only showed mounts stored in the database, displaying "No volumes/mounts configured" even when volumes were defined in docker-compose.yml.
This change keeps docker-compose.yml the single source of truth for compose volume configuration, but also exposes them and makes them editable in the UI under their existing Volumes component in the “Advanced” tab.
Checklist
Before submitting this PR, please make sure that:
canarybranch.(Existing GitHub) Issues related
#3015
#2750
Screenshots