nextcloud / docker

⛴ Docker image of Nextcloud
https://hub.docker.com/_/nextcloud/
GNU Affero General Public License v3.0
6.08k stars 1.83k forks source link

Clarify Additional Volumes section of the docs #2303

Open joshtrichards opened 1 month ago

joshtrichards commented 1 month ago

Two somewhat related problems:

One, I can't explain why, but I've lost count of the number of people that use mounted hosted directories (bind mounts) while configuring Additional volumes for apparently additional granularity... only to have everything end up in the same spot (pointless complexity). So this:

$ docker run -d \
-v nextcloud:/var/www/html \
-v apps:/var/www/html/custom_apps \
-v config:/var/www/html/config \
-v data:/var/www/html/data \
-v theme:/var/www/html/themes/<YOUR_CUSTOM_THEME> \
nextcloud

which may be useful... becomes something like this when turned into a bind mount:

$ docker run -d \
-v ./nextcloud:/var/www/html \
-v ./nextcloud/apps:/var/www/html/custom_apps \
-v ./nextcloud/config:/var/www/html/config \
-v ./nextcloud/data:/var/www/html/data \
-v ./nextcloud/theme:/var/www/html/themes/<YOUR_CUSTOM_THEME> \
nextcloud

... which is not useless, but breaks things (apps - see next item);

Two, when people attempt to "translate" the above example into a bind mounts, this one causes us support problems: -v apps:/var/www/html/custom_apps \. It seems to get often translated to something like ./nextcloud/apps:/var/www/html/custom_apps. That is a clearly broken setup.

Ideas to solve:

tzerber commented 1 month ago

I can happily do that, and I can do some examples, but I have a question: should I wait for my current examples PR to get merged then put a new one up OR make a separate branch out of this repo's main ? (Honestly, it was a bad move on my end to mess up that example PR that much and make it so different that it needed 21 commits to get it back at "decent looking", I'd really like to do it on separate PR ).

From what I can see, only the docs need updating, but it is a good excuse to re-check the example Dockerfiles. I also notice that the examples folder Readme itself need quite a bit of updating as well.