Open chbusold opened 1 year ago
After I while I found the root cause. When I do install the plugin using composer like this
composer \
--working-dir=/usr/src/roundcubemail/ \
--prefer-dist \
--prefer-stable \
--update-no-dev \
--no-interaction \
--optimize-autoloader \
require \
pimlie/authres_status:* \
; \
it creates an empty default config in /usr/src/roundcubemail/plugins/authres_status/config.inc.php
, which then overwrites my config when all the stuff is copied into /var/www/html
in docker-entrypoint.sh. A workaround is to remove this file after running composer.
However, in general the image seems to be confused at preexisting plugin config files in /var/www/html
, causing the 10s startup delay. A better solution may be to provide a way to inject plugin configs during docker-entrypoint.sh. Or should plugin configs be provided in /var/roundcube/config
?
There's a convention that plugin configs are searched in Roundcube's config folder named the same as the plugin (e.g. authres_status.inc.php). If you want to include the config right in your Docker image, COPY the file into /usr/src/roundcubemail/config
and it should be copied into the right location when the container starts.
The /var/roundcube/config volume is meant to hold configs that are injected into the container and need to be configured for each deployment.
Hi
A little thing I dont yet understand in the README:
Using working-dir=/usr/src/roundcubemail
put plugins un vendor
, example with kolab/calendar, wich is not found after a brand new startup of an image 🤔
FROM roundcube/roundcubemail:latest-fpm-alpine
RUN set -ex; \
yes | composer \
--working-dir=/usr/src/roundcubemail/ \
--prefer-dist \
--prefer-stable \
--update-no-dev \
--no-interaction \
--optimize-autoloader \
require \
guzzlehttp/guzzle \
johndoh/globaladdressbook \
kolab/calendar \
kolab/tasklist \
syncgw/roundcube_plugin \
;
COPY ["/plugins/calendar/config.inc.php", "/usr/src/roundcubemail/config/calendar/config.inc.php"]
COPY ["/plugins/tasklist/config.inc.php", "/usr/src/roundcubemail/config/tasklist/config.inc.php"]
COPY ["/plugins/libkolab/libokolab.min.css", "/usr/src/roundcubemail/config/libkolab/skins/elastic/libokolab.min.css"]`
With the default roundcube/roundcubemail image, using inside a composer require
put theme in plugins
folder... And then works.
Thanks a lot for any explanation 🙂
I created a Docker image derived from this to install another plugin using composer and install a custom configuration file like this:
COPY --chown=root:root --chmod=644 authres_status/config.inc.php /var/www/html/plugins/authres_status/config.inc.php
In the logs I see a lot of errors about not being able to load the file:
errors: <de821df1> PHP Error: Failed to load config from /var/www/html/plugins/authres_status/config.inc.php in /var/www/html/program/lib/Roundcube/rcube_plugin.php on line 166 (POST /?_task=settings&_action=refresh)
I checked inside the container to confirm the file exists and is readable for www-data:
Am I missing something obvious?