1
0
mirror of https://github.com/zokradonh/kopano-docker.git synced 2026-08-20 12:52:59 +00:00

Specify config location through KOPANO_CONFIG_PATH env variable (#352)

* Specify config location through KOPANO_CONFIG_PATH env variable
* add commander test to verify config is honoured by cli programs
* remove wrappers other than kopano-cli as it cannot make use of KOPANO_CONFIG_PATH

Fixes: https://github.com/zokradonh/kopano-docker/issues/351
This commit is contained in:
Felix Bartels
2020-03-05 14:35:05 +01:00
committed by GitHub
parent 5d4fabf280
commit 43928e538c
7 changed files with 31 additions and 33 deletions
+9 -8
View File
@@ -12,19 +12,20 @@ ARG KOPANO_CORE_VERSION=newest
ENV \
ADDITIONAL_KOPANO_PACKAGES=$ADDITIONAL_KOPANO_PACKAGES \
DOWNLOAD_BRANCH="" \
DOWNLOAD_CHANNEL="community" \
DOWNLOAD_COMMUNITY_PACKAGES=$DOWNLOAD_COMMUNITY_PACKAGES \
DOWNLOAD_DISTRIBUTION="Debian_10" \
DOWNLOAD_CHANNEL="community" \
DOWNLOAD_BRANCH="" \
GRAPI_BACKEND="kopano" \
KCCONF_GRAPI_LDAP_BASEDN="" \
KCCONF_GRAPI_LDAP_BINDDN="" \
KCCONF_GRAPI_LDAP_BINDPW_FILE="" \
KCCONF_GRAPI_LDAP_URI="" \
KOPANO_CONFIG_PATH=/tmp/kopano \
KOPANO_CORE_REPOSITORY_URL=$KOPANO_CORE_REPOSITORY_URL \
KOPANO_CORE_VERSION=$KOPANO_CORE_VERSION \
KOPANO_REPOSITORY_FLAGS=$KOPANO_REPOSITORY_FLAGS \
RELEASE_KEY_DOWNLOAD=$RELEASE_KEY_DOWNLOAD \
GRAPI_BACKEND="kopano" \
KCCONF_GRAPI_LDAP_URI="" \
KCCONF_GRAPI_LDAP_BASEDN="" \
KCCONF_GRAPI_LDAP_BINDDN="" \
KCCONF_GRAPI_LDAP_BINDPW_FILE=""
RELEASE_KEY_DOWNLOAD=$RELEASE_KEY_DOWNLOAD
LABEL maintainer=az@zok.xyz \
org.label-schema.name="Kopano core container" \
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
/usr/sbin/kopano-admin --config /tmp/kopano/admin.cfg "$@"
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
/usr/sbin/kopano-storeadm -c /tmp/kopano/admin.cfg "$@"
+7 -7
View File
@@ -123,7 +123,7 @@ server)
fi
# cleaning up env variables
unset "${!KCCONF_@}"
exec /usr/sbin/kopano-server --config /tmp/kopano/server.cfg -F
exec /usr/sbin/kopano-server -F
;;
dagent)
dockerize \
@@ -131,7 +131,7 @@ dagent)
-timeout 360s
# cleaning up env variables
unset "${!KCCONF_@}"
exec /usr/sbin/kopano-dagent --config /tmp/kopano/dagent.cfg -l
exec /usr/sbin/kopano-dagent -l
;;
gateway)
dockerize \
@@ -139,7 +139,7 @@ gateway)
-timeout 360s
# cleaning up env variables
unset "${!KCCONF_@}"
exec /usr/sbin/kopano-gateway --config /tmp/kopano/gateway.cfg -F
exec /usr/sbin/kopano-gateway -F
;;
ical)
dockerize \
@@ -147,7 +147,7 @@ ical)
-timeout 360s
# cleaning up env variables
unset "${!KCCONF_@}"
exec /usr/sbin/kopano-ical --config /tmp/kopano/ical.cfg -F
exec /usr/sbin/kopano-ical -F
;;
grapi)
LC_CTYPE=en_US.UTF-8
@@ -212,7 +212,7 @@ monitor)
-timeout 360s
# cleaning up env variables
unset "${!KCCONF_@}"
exec /usr/sbin/kopano-monitor --config /tmp/kopano/monitor.cfg -F
exec /usr/sbin/kopano-monitor -F
;;
search)
dockerize \
@@ -227,7 +227,7 @@ search)
if dpkg --compare-versions "$searchversion" "gt" "8.7.82.165"; then
exec /usr/sbin/kopano-search --config /tmp/kopano/search.cfg
else
exec /usr/bin/python3 /usr/sbin/kopano-search --config /tmp/kopano/search.cfg -F
exec /usr/bin/python3 /usr/sbin/kopano-search -F
fi
;;
spooler)
@@ -237,7 +237,7 @@ spooler)
-timeout 1080s
# cleaning up env variables
unset "${!KCCONF_@}"
exec /usr/sbin/kopano-spooler --config /tmp/kopano/spooler.cfg -F
exec /usr/sbin/kopano-spooler -F
;;
*)
echo "Failed to start: Unknown service name: '$SERVICE_TO_START'" | ts