Some instances seem to have trouble when overwritewebroot is set to `/`:
> Dec 14 11:51:37 s3 systemd[1]: Starting Runs the cronjobs For Nextcloud (mash-nextcloud)...
> Dec 14 11:51:37 s3 env[1246702]: Sabre\DAV\Exception\Forbidden: Requested uri (/remote.php/dav/) is out of base uri (//remote.php/dav/) in /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php:576
> Dec 14 11:51:37 s3 env[1246702]: Stack trace:
> Dec 14 11:51:37 s3 env[1246702]: #0 /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php(542): Sabre\DAV\Server->calculateUri('/remote.php/dav...')
> Dec 14 11:51:37 s3 env[1246702]: #1 /var/www/html/apps/photos/lib/Listener/SabrePluginAuthInitListener.php(50): Sabre\DAV\Server->getRequestUri()
> Dec 14 11:51:37 s3 env[1246702]: #2 /var/www/html/lib/private/EventDispatcher/ServiceEventListener.php(86): OCA\Photos\Listener\SabrePluginAuthInitListener->handle(Object(OCA\DAV\Events\SabrePluginAuthInitEvent))
> Dec 14 11:51:37 s3 env[1246702]: #3 /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php(230): OC\EventDispatcher\ServiceEventListener->__invoke(Object(OCA\DAV\Events\SabrePluginAuthInitEvent), 'OCA\\DAV\\Events\\...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
> Dec 14 11:51:37 s3 env[1246702]: #4 /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'OCA\\DAV\\Events\\...', Object(OCA\DAV\Events\SabrePluginAuthInitEvent))
> Dec 14 11:51:37 s3 env[1246702]: #5 /var/www/html/lib/private/EventDispatcher/EventDispatcher.php(94): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(OCA\DAV\Events\SabrePluginAuthInitEvent), 'OCA\\DAV\\Events\\...')
> Dec 14 11:51:37 s3 env[1246702]: #6 /var/www/html/lib/private/EventDispatcher/EventDispatcher.php(106): OC\EventDispatcher\EventDispatcher->dispatch('OCA\\DAV\\Events\\...', Object(OCA\DAV\Events\SabrePluginAuthInitEvent))
> Dec 14 11:51:37 s3 env[1246702]: #7 /var/www/html/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php(76): OC\EventDispatcher\EventDispatcher->dispatchTyped(Object(OCA\DAV\Events\SabrePluginAuthInitEvent))
> Dec 14 11:51:37 s3 env[1246702]: #8 [internal function]: OCA\DAV\CalDAV\InvitationResponse\InvitationResponseServer->__construct(true
It seems like changing overwritewebroot to an empty string solves the
problem there, and doesn't seem to be introducign regressions for
installations that didn't have the problem in the first place.
* Update main.yml
set container customizations to enabled if nextcloud_container_image_smb_enabled is set (OR imagemagick)
* nextcloud_container_image_customizations_smb_enabled activates customizations
* add smbclient installation to docker image, if enabled
see https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/smb/apache/Dockerfile for source
* Set variable default and revise multiline syntax
Integrate suggestions from @spantaleev
* Refactor code to make only a single, one-line package install
Per suggestion @spanteleev; so that extra files can be deleted without leaving a footprint in the stack of images
* Preview generator setup
Enable the variable nextcloud_preview_enabled and you are good to go.
Some important aspects of usage:
- the preview generator has two stages [according to their readme](https://github.com/nextcloud/previewgenerator)
- a generate-all phase, which has to be executed only a single time
- a pre-generate phase, that should be run in a cronjob.
That runs quite fast if the generate-all phase finishd.
We do not want to run the generate-all phase multiple times, so its execution has to be followed somehow.
This is done by creating a file on the host side and both the task that executes generate-all
and both the cronjob checks its existance.
Multiple vaiables are also defined and the corresponding default values are also set.
These values are based on the [upstream readme](https://github.com/nextcloud/previewgenerator) and also on experience.
Feel free to change anything.
Once installed, the playbook needs to be called with the adjust-nextcloud-config tag.
This tag sets up the variables and calls the generate-all script, that will also create the file---signalling
its finished state---on the host.
*** As this may take a long time, be sure to only call it when you have time to leave it running!!! ***
The playbook calls generate-all asynchronously, but it will timeout after about 27h.
On 60GBs, most if images, it took about 10 minutes to finish.
If it takes more time, you may want to start it from the host by calling
```sh
/usr/bin/env docker exec mash-nextcloud-server php /var/www/html/occ preview:generate-all
```
If the nextcloud_preview_enabled value is set back to false, the host side files are cleaned up
and also the cron job is changed, not to call prevew generation again however, the database and generated
previews are kept intact.
* fix playbook format suggestions by Slavi (see conversation in !7)