Skip to content
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

Clarify Additional Volumes section of the docs #2303

Open
joshtrichards opened this issue Sep 29, 2024 · 1 comment · May be fixed by #2315
Open

Clarify Additional Volumes section of the docs #2303

joshtrichards opened this issue Sep 29, 2024 · 1 comment · May be fixed by #2315

Comments

@joshtrichards
Copy link
Member

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:

  • Rename the named volume apps in the example to custom_apps for added clarity
  • Add an example that uses bind mounts to avoid the apparent "translation errors" that occur (and also giving us another opportunity to point out it's a pointless complication unless the source of the mount is going to be somewhere else relative all the other subfolders)
@tzerber
Copy link
Contributor

tzerber commented Oct 2, 2024

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.

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

Successfully merging a pull request may close this issue.

2 participants