mirror of
https://github.com/zokradonh/kopano-docker
synced 2025-06-07 16:06:14 +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:
parent
5d4fabf280
commit
43928e538c
@ -14,8 +14,8 @@ ARG KOPANO_GID=999
|
|||||||
|
|
||||||
ENV \
|
ENV \
|
||||||
BASE_VERSION=2.0.0 \
|
BASE_VERSION=2.0.0 \
|
||||||
DEBUG="" \
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
DEBIAN_FRONTEND=noninteractive
|
DEBUG=""
|
||||||
|
|
||||||
LABEL maintainer=az@zok.xyz \
|
LABEL maintainer=az@zok.xyz \
|
||||||
org.label-schema.name="Kopano base container" \
|
org.label-schema.name="Kopano base container" \
|
||||||
|
@ -12,19 +12,20 @@ ARG KOPANO_CORE_VERSION=newest
|
|||||||
|
|
||||||
ENV \
|
ENV \
|
||||||
ADDITIONAL_KOPANO_PACKAGES=$ADDITIONAL_KOPANO_PACKAGES \
|
ADDITIONAL_KOPANO_PACKAGES=$ADDITIONAL_KOPANO_PACKAGES \
|
||||||
|
DOWNLOAD_BRANCH="" \
|
||||||
|
DOWNLOAD_CHANNEL="community" \
|
||||||
DOWNLOAD_COMMUNITY_PACKAGES=$DOWNLOAD_COMMUNITY_PACKAGES \
|
DOWNLOAD_COMMUNITY_PACKAGES=$DOWNLOAD_COMMUNITY_PACKAGES \
|
||||||
DOWNLOAD_DISTRIBUTION="Debian_10" \
|
DOWNLOAD_DISTRIBUTION="Debian_10" \
|
||||||
DOWNLOAD_CHANNEL="community" \
|
GRAPI_BACKEND="kopano" \
|
||||||
DOWNLOAD_BRANCH="" \
|
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_REPOSITORY_URL=$KOPANO_CORE_REPOSITORY_URL \
|
||||||
KOPANO_CORE_VERSION=$KOPANO_CORE_VERSION \
|
KOPANO_CORE_VERSION=$KOPANO_CORE_VERSION \
|
||||||
KOPANO_REPOSITORY_FLAGS=$KOPANO_REPOSITORY_FLAGS \
|
KOPANO_REPOSITORY_FLAGS=$KOPANO_REPOSITORY_FLAGS \
|
||||||
RELEASE_KEY_DOWNLOAD=$RELEASE_KEY_DOWNLOAD \
|
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=""
|
|
||||||
|
|
||||||
LABEL maintainer=az@zok.xyz \
|
LABEL maintainer=az@zok.xyz \
|
||||||
org.label-schema.name="Kopano core container" \
|
org.label-schema.name="Kopano core container" \
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
/usr/sbin/kopano-admin --config /tmp/kopano/admin.cfg "$@"
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
/usr/sbin/kopano-storeadm -c /tmp/kopano/admin.cfg "$@"
|
|
@ -123,7 +123,7 @@ server)
|
|||||||
fi
|
fi
|
||||||
# cleaning up env variables
|
# cleaning up env variables
|
||||||
unset "${!KCCONF_@}"
|
unset "${!KCCONF_@}"
|
||||||
exec /usr/sbin/kopano-server --config /tmp/kopano/server.cfg -F
|
exec /usr/sbin/kopano-server -F
|
||||||
;;
|
;;
|
||||||
dagent)
|
dagent)
|
||||||
dockerize \
|
dockerize \
|
||||||
@ -131,7 +131,7 @@ dagent)
|
|||||||
-timeout 360s
|
-timeout 360s
|
||||||
# cleaning up env variables
|
# cleaning up env variables
|
||||||
unset "${!KCCONF_@}"
|
unset "${!KCCONF_@}"
|
||||||
exec /usr/sbin/kopano-dagent --config /tmp/kopano/dagent.cfg -l
|
exec /usr/sbin/kopano-dagent -l
|
||||||
;;
|
;;
|
||||||
gateway)
|
gateway)
|
||||||
dockerize \
|
dockerize \
|
||||||
@ -139,7 +139,7 @@ gateway)
|
|||||||
-timeout 360s
|
-timeout 360s
|
||||||
# cleaning up env variables
|
# cleaning up env variables
|
||||||
unset "${!KCCONF_@}"
|
unset "${!KCCONF_@}"
|
||||||
exec /usr/sbin/kopano-gateway --config /tmp/kopano/gateway.cfg -F
|
exec /usr/sbin/kopano-gateway -F
|
||||||
;;
|
;;
|
||||||
ical)
|
ical)
|
||||||
dockerize \
|
dockerize \
|
||||||
@ -147,7 +147,7 @@ ical)
|
|||||||
-timeout 360s
|
-timeout 360s
|
||||||
# cleaning up env variables
|
# cleaning up env variables
|
||||||
unset "${!KCCONF_@}"
|
unset "${!KCCONF_@}"
|
||||||
exec /usr/sbin/kopano-ical --config /tmp/kopano/ical.cfg -F
|
exec /usr/sbin/kopano-ical -F
|
||||||
;;
|
;;
|
||||||
grapi)
|
grapi)
|
||||||
LC_CTYPE=en_US.UTF-8
|
LC_CTYPE=en_US.UTF-8
|
||||||
@ -212,7 +212,7 @@ monitor)
|
|||||||
-timeout 360s
|
-timeout 360s
|
||||||
# cleaning up env variables
|
# cleaning up env variables
|
||||||
unset "${!KCCONF_@}"
|
unset "${!KCCONF_@}"
|
||||||
exec /usr/sbin/kopano-monitor --config /tmp/kopano/monitor.cfg -F
|
exec /usr/sbin/kopano-monitor -F
|
||||||
;;
|
;;
|
||||||
search)
|
search)
|
||||||
dockerize \
|
dockerize \
|
||||||
@ -227,7 +227,7 @@ search)
|
|||||||
if dpkg --compare-versions "$searchversion" "gt" "8.7.82.165"; then
|
if dpkg --compare-versions "$searchversion" "gt" "8.7.82.165"; then
|
||||||
exec /usr/sbin/kopano-search --config /tmp/kopano/search.cfg
|
exec /usr/sbin/kopano-search --config /tmp/kopano/search.cfg
|
||||||
else
|
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
|
fi
|
||||||
;;
|
;;
|
||||||
spooler)
|
spooler)
|
||||||
@ -237,7 +237,7 @@ spooler)
|
|||||||
-timeout 1080s
|
-timeout 1080s
|
||||||
# cleaning up env variables
|
# cleaning up env variables
|
||||||
unset "${!KCCONF_@}"
|
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
|
echo "Failed to start: Unknown service name: '$SERVICE_TO_START'" | ts
|
||||||
|
@ -55,8 +55,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- ADDITIONAL_KOPANO_PACKAGES=${ADDITIONAL_KOPANO_PACKAGES}
|
- ADDITIONAL_KOPANO_PACKAGES=${ADDITIONAL_KOPANO_PACKAGES}
|
||||||
- KCCOMMENT_LDAP_1=${KCCOMMENT_LDAP_1}
|
- KCCOMMENT_LDAP_1=${KCCOMMENT_LDAP_1}
|
||||||
# Hint: if additional locales are required that should be added in base/Dockerfile
|
- KCCONF_ADMIN_DEFAULT_STORE_LOCALE=${MAILBOXLANG:-en_US.UTF-8} # Hint: if additional locales are required these should be added in base/Dockerfile
|
||||||
- KCCONF_ADMIN_DEFAULT_STORE_LOCALE=${MAILBOXLANG:-en_US.UTF-8}
|
|
||||||
- KCCONF_LDAP_LDAP_BIND_PASSWD=${LDAP_BIND_PW}
|
- KCCONF_LDAP_LDAP_BIND_PASSWD=${LDAP_BIND_PW}
|
||||||
- KCCONF_LDAP_LDAP_BIND_USER=${LDAP_BIND_DN}
|
- KCCONF_LDAP_LDAP_BIND_USER=${LDAP_BIND_DN}
|
||||||
- KCCONF_LDAP_LDAP_SEARCH_BASE=${LDAP_SEARCH_BASE}
|
- KCCONF_LDAP_LDAP_SEARCH_BASE=${LDAP_SEARCH_BASE}
|
||||||
|
@ -30,14 +30,18 @@ tests:
|
|||||||
- "Drafts"
|
- "Drafts"
|
||||||
contains:
|
contains:
|
||||||
- "Postvak IN"
|
- "Postvak IN"
|
||||||
# test renaming of folders:
|
test renaming of folders:
|
||||||
# command: docker exec kopano_server env KCCONF_ADMIN_DEFAULT_STORE_LOCALE=de_DE.UTF-8 /usr/bin/python3 /kopano/server.py && docker exec kopano_server kopano-storeadm -Y -n user12
|
command: docker exec kopano_server env KCCONF_ADMIN_DEFAULT_STORE_LOCALE=de_DE.UTF-8 /usr/bin/python3 /kopano/server.py && docker exec kopano_server kopano-storeadm -Y -n user13
|
||||||
# exit-code: 0
|
exit-code: 0
|
||||||
# stderr:
|
stdout:
|
||||||
# contains:
|
not-contains:
|
||||||
# - The -l option was not specified; "de_DE.UTF-8" will be used as language
|
- "Inbox"
|
||||||
# - Posteingang
|
- "Drafts"
|
||||||
# - Entwürfe
|
contains:
|
||||||
|
- "Posteingang"
|
||||||
|
stderr:
|
||||||
|
contains:
|
||||||
|
- The -l option was not specified; "de_DE.UTF-8" will be used as language
|
||||||
config:
|
config:
|
||||||
env:
|
env:
|
||||||
PATH: ${PATH}
|
PATH: ${PATH}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user