mirror of
https://github.com/zokradonh/kopano-docker.git
synced 2026-08-11 16:32:59 +00:00
WIP: Kopano Konnect und Rest API (#72)
* add a new image for konnect * add konnect to compose file * adapt gencerts for konnect certs * integrate gencerts into start.sh and adapt if to only skip individual parts * add container for kapi * use same config for webapp and z-push as https://stash.kopano.io/projects/KGOL/repos/kweb/browse/config/legacy.go * use example compose file in make test target * make compose file configurable through an env variable * remove legacy links in compose * write certificates first to a tempfile * remove unnecessary paths * add option to run kapi insecure for testing * configure openid for kopano-server * add local playground to test functionality of konnect and kapi * print errors and logs to stdout in web * add extrahosts to kopano_server * adapt extrahosts for ip command on ubuntu 18.04 * add documentation Signed-off-by: Felix Bartels <felix@host-consultants.de>
This commit is contained in:
@@ -29,6 +29,7 @@ RUN \
|
||||
set -x && \
|
||||
apt-get install --no-install-recommends -y \
|
||||
kopano-server-packages \
|
||||
kopano-grapi kopano-kapid \
|
||||
${ADDITIONAL_KOPANO_PACKAGES} \
|
||||
&& \
|
||||
set +x && \
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import os
|
||||
import kcconf
|
||||
|
||||
# Override configs from environment variables
|
||||
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/etc/kopano/"))
|
||||
@@ -0,0 +1,18 @@
|
||||
import os
|
||||
import kcconf
|
||||
|
||||
# Component specific configurations
|
||||
kcconf.configkopano({
|
||||
r"/etc/kopano/kapid.cfg":
|
||||
{
|
||||
'log_level': "info",
|
||||
'listen': "0.0.0.0:8039",
|
||||
'DEFAULT_PLUGIN_PUBS_SECRET_KEY_FILE': "/kopano/ssl/kapid-pubs-secret.key",
|
||||
'plugin_kvs_db_datasource': "/kopano/data/kapi-kvs/kvs.db",
|
||||
'plugin_grapi_socket_path': "/var/run/kopano/grapi"
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
# Override configs from environment variables
|
||||
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/etc/kopano/"))
|
||||
+23
-1
@@ -16,7 +16,7 @@ fi
|
||||
fi
|
||||
done
|
||||
|
||||
mkdir -p /kopano/data/attachments /tmp/$SERVICE_TO_START /var/run/kopano
|
||||
mkdir -p /kopano/data/attachments /kopano/data/kapi-kvs /tmp/$SERVICE_TO_START /var/run/kopano
|
||||
|
||||
echo "Configure core service '$SERVICE_TO_START'" | ts
|
||||
/usr/bin/python3 /kopano/$SERVICE_TO_START.py
|
||||
@@ -72,6 +72,28 @@ ical)
|
||||
unset "${!KCCONF_@}"
|
||||
exec /usr/sbin/kopano-ical -F
|
||||
;;
|
||||
grapi)
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
export socket_path=/var/run/kopano/grapi
|
||||
mkdir $socket_path
|
||||
chown -R kapi:kopano $socket_path
|
||||
# cleaning up env variables
|
||||
unset "${!KCCONF_@}"
|
||||
exec kopano-grapi serve
|
||||
;;
|
||||
kapid)
|
||||
dockerize \
|
||||
-wait file://var/run/kopano/grapi/notify.sock \
|
||||
-wait http://kopano_konnect:8777/.well-known/openid-configuration \
|
||||
-timeout 360s
|
||||
LC_CTYPE=en_US.UTF-8
|
||||
sed -i s/\ *=\ */=/g /etc/kopano/kapid.cfg
|
||||
export $(grep -v '^#' /etc/kopano/kapid.cfg | xargs -d '\n')
|
||||
kopano-kapid setup
|
||||
# cleaning up env variables
|
||||
unset "${!KCCONF_@}"
|
||||
exec kopano-kapid serve --log-timestamp=false
|
||||
;;
|
||||
monitor)
|
||||
dockerize \
|
||||
-wait file://var/run/kopano/server.sock \
|
||||
|
||||
Reference in New Issue
Block a user