mirror of
				https://github.com/zokradonh/kopano-docker
				synced 2025-10-31 02:17:47 +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 \ | ||||
|     BASE_VERSION=2.0.0 \ | ||||
|     DEBUG="" \ | ||||
|     DEBIAN_FRONTEND=noninteractive | ||||
|     DEBIAN_FRONTEND=noninteractive \ | ||||
|     DEBUG="" | ||||
| 
 | ||||
| LABEL maintainer=az@zok.xyz \ | ||||
|     org.label-schema.name="Kopano base container" \ | ||||
|  | ||||
| @ -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" \ | ||||
|  | ||||
| @ -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 | ||||
| 	# 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 | ||||
|  | ||||
| @ -55,8 +55,7 @@ services: | ||||
|     environment: | ||||
|       - ADDITIONAL_KOPANO_PACKAGES=${ADDITIONAL_KOPANO_PACKAGES} | ||||
|       - 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} | ||||
|       - KCCONF_ADMIN_DEFAULT_STORE_LOCALE=${MAILBOXLANG:-en_US.UTF-8} # Hint: if additional locales are required these should be added in base/Dockerfile | ||||
|       - KCCONF_LDAP_LDAP_BIND_PASSWD=${LDAP_BIND_PW} | ||||
|       - KCCONF_LDAP_LDAP_BIND_USER=${LDAP_BIND_DN} | ||||
|       - KCCONF_LDAP_LDAP_SEARCH_BASE=${LDAP_SEARCH_BASE} | ||||
|  | ||||
| @ -30,14 +30,18 @@ tests: | ||||
|         - "Drafts" | ||||
|       contains: | ||||
|         - "Postvak IN" | ||||
| #  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 | ||||
| #    exit-code: 0 | ||||
| #    stderr: | ||||
| #      contains: | ||||
| #        - The -l option was not specified; "de_DE.UTF-8" will be used as language | ||||
| #        - Posteingang | ||||
| #        - Entwürfe | ||||
|   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 user13 | ||||
|     exit-code: 0 | ||||
|     stdout: | ||||
|       not-contains: | ||||
|         - "Inbox" | ||||
|         - "Drafts" | ||||
|       contains: | ||||
|         - "Posteingang" | ||||
|     stderr: | ||||
|       contains: | ||||
|         - The -l option was not specified; "de_DE.UTF-8" will be used as language | ||||
| config: | ||||
|   env: | ||||
|     PATH: ${PATH} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user