mirror of
https://github.com/zokradonh/kopano-docker
synced 2025-06-06 15:36:40 +00:00
also update config settings for plugins installed during runtime (#447)
* also update config settings for plugins installed during runtime * update webapp example * skip duplicate handling of config.php * add todo
This commit is contained in:
parent
56722ee6fc
commit
0dd0f49866
@ -21,6 +21,8 @@ services:
|
||||
- SETGID
|
||||
- SETUID
|
||||
volumes:
|
||||
- /etc/machine-id:/etc/machine-id
|
||||
- /etc/machine-id:/var/lib/dbus/machine-id
|
||||
- web:/.kweb
|
||||
networks:
|
||||
web-net:
|
||||
@ -33,6 +35,8 @@ services:
|
||||
container_name: kopano_webapp
|
||||
volumes:
|
||||
- /etc/kopano/ssl:/kopano/ssl
|
||||
- /etc/machine-id:/etc/machine-id
|
||||
- /etc/machine-id:/var/lib/dbus/machine-id
|
||||
- /run/kopano:/run/kopano
|
||||
environment:
|
||||
- TZ=${TZ}
|
||||
@ -41,6 +45,9 @@ services:
|
||||
# https port of kopano system
|
||||
- KCCONF_SERVERPORT=
|
||||
- ADDITIONAL_KOPANO_WEBAPP_PLUGINS=${ADDITIONAL_KOPANO_WEBAPP_PLUGINS}
|
||||
#- ADDITIONAL_KOPANO_WEBAPP_PLUGINS=kopano-webapp-plugin-mdm
|
||||
- KCCONF_WEBAPPPLUGIN_MDM_PLUGIN_MDM_USER_DEFAULT_ENABLE_MDM=true
|
||||
- KCCONF_WEBAPPPLUGIN_MDM_PLUGIN_MDM_SERVER=kopano_zpush:9080
|
||||
networks:
|
||||
- web-net
|
||||
|
||||
|
@ -13,6 +13,7 @@ php_cfg_gen() {
|
||||
return
|
||||
fi
|
||||
case $cfg_value in
|
||||
# TODO stop after the first match
|
||||
true|TRUE|false|FALSE)
|
||||
sed -ri "s#(\s*define).+${cfg_setting}.+#\tdefine(\x27${cfg_setting}\x27, ${cfg_value}\);#g" "$cfg_file"
|
||||
;;
|
||||
|
@ -34,6 +34,14 @@ if [ "${AUTOCONFIGURE}" == true ]; then
|
||||
echo "- switch the container to 'read_only: false'"
|
||||
fi
|
||||
|
||||
phpversion=$(dpkg-query --showformat='${Version}' --show php7-mapi)
|
||||
echo "Using PHP-Mapi: $phpversion"
|
||||
webappversion=$(dpkg-query --showformat='${Version}' --show kopano-webapp)
|
||||
echo "Using Kopano WebApp: $webappversion"
|
||||
|
||||
# Ensure directories exist
|
||||
mkdir -p /run/sessions /tmp/webapp /var/lib/kopano-webapp/tmp
|
||||
|
||||
# copy latest config template
|
||||
mkdir -p /tmp/webapp/
|
||||
for i in /etc/kopano/webapp/*.dist /etc/kopano/webapp/.[^.]*.dist; do
|
||||
@ -41,13 +49,15 @@ if [ "${AUTOCONFIGURE}" == true ]; then
|
||||
cp "$i" "/tmp/webapp/${filename%.*}"
|
||||
done
|
||||
|
||||
# Ensure directories exist
|
||||
mkdir -p /run/sessions /tmp/webapp /var/lib/kopano-webapp/tmp
|
||||
|
||||
phpversion=$(dpkg-query --showformat='${Version}' --show php7-mapi)
|
||||
echo "Using PHP-Mapi: $phpversion"
|
||||
webappversion=$(dpkg-query --showformat='${Version}' --show kopano-webapp)
|
||||
echo "Using Kopano WebApp: $webappversion"
|
||||
# fallback for plugins installed during runtime
|
||||
for i in /etc/kopano/webapp/*.php; do
|
||||
filename=$(basename -- "$i")
|
||||
if [ "$filename" = config.php ]; then
|
||||
continue
|
||||
fi
|
||||
mv -vn "$i" "/tmp/webapp/$filename"
|
||||
ln -sfn "/tmp/webapp/$filename" "$i"
|
||||
done
|
||||
|
||||
if [ "$KCCONF_SERVERHOSTNAME" == "127.0.0.1" ]; then
|
||||
echo "Kopano WebApp is using the default: connection"
|
||||
|
Loading…
x
Reference in New Issue
Block a user