Skip to content

Conversation

@WilliamAGH
Copy link

@WilliamAGH WilliamAGH commented Dec 25, 2025

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:

(Existing GitHub) Issues related

#3015
#2750

Screenshots

image

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.
Copilot AI review requested due to automatic review settings December 25, 2025 02:14
@WilliamAGH WilliamAGH changed the title feat(compose): display and edit docker-compose.yml volumes in UI feat(service/compose): display and edit docker-compose.yml volumes in UI Dec 25, 2025
Copy link

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant