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