Ability to override the default persistent volume mount

Open
#668 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, php

Research direction

Start with the occ app_api:app:register entry point and trace how the --mount option and persistent volume are mapped into the Docker container. Reproduce the sample registration with a mount targeting /nc_app_APP_ID_data, then verify that the explicit mount replaces the persistent volume and that the data remains after the app is removed.

Written by the indexing model from the issue text.

Description

enhancement priority: low
Describe why it is important and where it will be useful

Most if not all apps put their persistent data in this volume so it would be nice to override it so the local data can be used/the data can be kept even after the ex-app is removed completely (with data).

Describe your proposed solution

Check for the mount mapping in the docker container, if it tries to bind the exact same path as the persistent volume, do not try to mount the persistent volume and use this one.
A sample ex-app register command to mount a volume:

occ app_api:app:register APP_ID harp_proxy_docker --wait-finish --mount /path/in/local/storage/persistent_storage_my_app:/nc_app_APP_ID_data
Describe alternatives you've considered, if relevant

No response

Additional context

No response

Dominant language
PHP
Stars
202
Forks
30
Avg merge
3d 20h
Merged PRs (30d)
24

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextcloud/app_api

All issues in nextcloud/app_api

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.