nextcloud / docker

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

Clarify Readme on bind volumes to avoid `apps` / `custom_apps` mishaps #2315

Open tzerber opened 1 month ago

tzerber commented 1 month ago

Related to #2303

Added two examples, renamed the apps to custom_apps and added a note on mixing the apps and custom apps folder. I might put some comments in the examples folder too, if needed.

tzerber commented 1 month ago

Well, same thinking, different English skills :-) . There's no reason for the apps folder itself to be on a different volume than the main server app. I'm unsure on the location of AppApi stuff (and honestly it's too late now and I'm too lazy to boot up pc to check) but I have a guess they are in the custom apps folder as well. Also, it's probably a nice occasion to test GitHub on phone and suggestions 🫣

Off topic below, might open a discussion somewhere:

Another wild idea around the appapi, should we mention it somewhere, because I had quite a bit of hard time setting it up and probably other people did too? I find myself often copy-pasting from this repo when setting up NC for clients, and I guess it would be easier for other people to have at least a starting point. Just throwing a thought here, I think we (me :-) ) should expand a bit that examples readme with a more "fancy example compose for dummies" with say hpb for talk and appapi (the llm assistant is quite helpful, plus it's a hot topic anyway). I'd personally throw OnlyOffice docs server as well, I don't have clue on why but it works A L O T better for actual colab on docs/sheets for me. Or maybe example that contains additional services that (ideally) needs to be in the same compose file, and are most commonly used? (Poll somewhere and see what people would suggest is honestly not a bad idea).

На вт, 22.10.2024 г., 01:13 ч. Josh @.***> написа:

@.**** approved this pull request.

Just a minor suggestion. And also, a possible alternative to even my suggestion that is tempting so I'll mention it to get your thoughts on it: we drop mention of apps/ entirely. ;-)

My thinking is that in the image we can essentially treat it 100% as a shipped component, and therefore just part of the installation. I see zero reason to ever include or suggest anyone place it on a separate volume (at least no more reason than to suggest they do so with any other arbitrary folder in /var/www/html that comes from Server directly).

In README.md https://github.com/nextcloud/docker/pull/2315#discussion_r1809596348:

+-v $(pwd)/data:/var/www/html/data \ +-v $(pwd)/theme:/var/www/html/themes/ \ +nextcloud + + +Here’s the same example using Docker's more detailed `--mount`. Note that with `-v` or `--volume`, the specified folders are created automatically if they don't exist. However, when using `--mount` for bind mounts, the directories must already exist on the host, or Docker will return an error. +console +$ docker run -d \ +--mount type=bind,source=$(pwd)/nextcloud,target=/var/www/html \ +--mount type=bind,source=$(pwd)/custom_apps,target=/var/www/html/custom_apps \ +--mount type=bind,source=$(pwd)/config,target=/var/www/html/config \ +--mount type=bind,source=$(pwd)/data,target=/var/www/html/data \ +--mount type=bind,source=$(pwd)/theme,target=/var/www/html/themes/ \ +nextcloud +`` +The examples above use the current directory for bind mounts. If this isn't suitable, you can modify the paths by using either a relative or absolute path. Additionally, do not mix theappsandcustom_apps` folders. These folders contain different sets of apps, and mixing them will result in a broken installation. While upgrades\recovery may sometimes still be possible, this configuration is likely to cause issues.

⬇️ Suggested change

-The examples above use the current directory for bind mounts. If this isn't suitable, you can modify the paths by using either a relative or absolute path. Additionally, do not mix the apps and custom_apps folders. These folders contain different sets of apps, and mixing them will result in a broken installation. While upgrades\recovery may sometimes still be possible, this configuration is likely to cause issues. +The examples above use the current directory for bind mounts. If this isn't suitable, you can modify the paths by using either a relative or absolute path. + +NOTE: Do not confuse the apps and custom_apps folders. These folders contain different sets of apps, and mixing them will result in a broken installation. The former contains "shipped" apps, which come with Nextcloud Server. The latter contains apps you install from the App Store.

— Reply to this email directly, view it on GitHub https://github.com/nextcloud/docker/pull/2315#pullrequestreview-2383392070, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMO3PHCMFNYSEEQVG6OJU3Z4V4BBAVCNFSM6AAAAABQENZ6XKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGOBTGM4TEMBXGA . You are receiving this because you authored the thread.Message ID: @.***>