Add REST API endpoints for application persistent storage (volumes) #8409
jcserracampos
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
The Coolify REST API currently has no endpoints for managing persistent storage (volumes) on applications. The
LocalPersistentVolumemodel, theApplication->persistentStorages()relationship, and the deployment job that mounts volumes all exist — the only missing piece is the API surface.Currently, persistent storage can only be managed through the Livewire UI components (
app/Livewire/Project/Service/Storage.php). Programmatic deployments have no way to add, list, update, or remove volumes via the API.Additionally,
custom_docker_run_optionswith--volumeis silently ignored byconvertDockerRunToCompose()inbootstrap/helpers/docker.php(not in the supported options whitelist), which makes this gap even more impactful — there is no API workaround at all.Proposed Solution
Add 5 new endpoints following the same pattern as the existing environment variable endpoints:
/applications/{uuid}/storages/applications/{uuid}/storages/applications/{uuid}/storages/{storage_id}/applications/{uuid}/storages/{storage_id}/applications/{uuid}/storages/{storage_id}Use Case
Any tool or SaaS that deploys applications programmatically via the Coolify API needs to attach persistent volumes (e.g., for config directories, data files, credentials). Without these endpoints, the only option is direct database manipulation, which is fragile and unsupported.
Files Affected
routes/api.php— Add 5 new routesapp/Http/Controllers/Api/ApplicationsController.php— Add 5 new controller methods with OpenAPI annotationsBeta Was this translation helpful? Give feedback.
All reactions