mirror of
https://github.com/zokradonh/kopano-docker
synced 2025-06-07 07:56:12 +00:00
Make registration_conf configurable through an env (#369)
* Make registration_conf configurable through an env Fixes https://github.com/zokradonh/kopano-docker/issues/368 Signed-off-by: Felix Bartels <felix@host-consultants.de> * add registration_conf to meet example Signed-off-by: Felix Bartels <felix@host-consultants.de>
This commit is contained in:
parent
5281fb1f03
commit
c9701494f1
@ -414,6 +414,7 @@ services:
|
||||
- INSECURE=${INSECURE}
|
||||
- oidc_issuer_identifier=https://${FQDN}
|
||||
- public_guest_access_regexp=^group/public/.*
|
||||
- registration_conf=/kopano/ssl/konnectd-identifier-registration.yaml
|
||||
env_file:
|
||||
- kopano_kwmserver.env
|
||||
volumes:
|
||||
|
@ -156,6 +156,7 @@ services:
|
||||
- INSECURE=${INSECURE}
|
||||
- oidc_issuer_identifier=https://${FQDN}
|
||||
- public_guest_access_regexp=^group/public/.*
|
||||
- registration_conf=/kopano/ssl/konnectd-identifier-registration.yaml
|
||||
- turn_service_credentials_password=${TURN_PASSWORD}
|
||||
- turn_service_credentials_user=${TURN_USER}
|
||||
volumes:
|
||||
|
@ -2,18 +2,16 @@
|
||||
|
||||
set -e
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
if [ -n "$log_level" ]; then
|
||||
if [ -n "${log_level:-}" ]; then
|
||||
set -- "$@" --log-level="$log_level"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
if [ -n "$oidc_issuer_identifier" ]; then
|
||||
if [ -n "${oidc_issuer_identifier:-}" ]; then
|
||||
set -- "$@" --iss="$oidc_issuer_identifier"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
if [ "$enable_guest_api" = "yes" ]; then
|
||||
if [ "${enable_guest_api:-}" = "yes" ]; then
|
||||
set -- "$@" --enable-guest-api
|
||||
fi
|
||||
|
||||
@ -22,46 +20,38 @@ if [ "$INSECURE" = "yes" ]; then
|
||||
fi
|
||||
|
||||
# kwmserver turn
|
||||
# shellcheck disable=SC2154
|
||||
if [ -z "$turn_service_url" ]; then
|
||||
turn_service_url=https://turnauth.kopano.com/turnserverauth/
|
||||
fi
|
||||
# default to Kopano turn service
|
||||
turn_service_url=${turn_service_url:-https://turnauth.kopano.com/turnserverauth/}
|
||||
|
||||
if [ -n "$turn_service_url" ]; then
|
||||
set -- "$@" --turn-service-url="$turn_service_url"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
if [ -n "$turn_service_credentials_user" ] && [ -n "$turn_service_credentials_password" ]; then
|
||||
if [ -n "${turn_service_credentials_user:-}" ] && [ -n "${turn_service_credentials_password:-}" ]; then
|
||||
turn_service_credentials=/tmp/turn_service_credentials
|
||||
echo "$turn_service_credentials_user":"$turn_service_credentials_password" > "$turn_service_credentials"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
if [ -n "$turn_service_credentials" ]; then
|
||||
if [ -n "${turn_service_credentials:-}" ]; then
|
||||
set -- "$@" --turn-service-credentials="$turn_service_credentials"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
if [ -n "$turn_server_shared_secret" ]; then
|
||||
if [ -n "${turn_server_shared_secret:-}" ]; then
|
||||
set -- "$@" --turn-server-shared-secret="$turn_server_shared_secret"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
if [ -n "$turn_uris" ]; then
|
||||
if [ -n "${turn_uris:-}" ]; then
|
||||
for uri in $turn_uris; do
|
||||
set -- "$@" --turn-uri="$uri"
|
||||
done
|
||||
fi
|
||||
|
||||
# kwmserver guest
|
||||
# shellcheck disable=SC2154
|
||||
if [ "$allow_guest_only_channels" = "yes" ]; then
|
||||
if [ "${allow_guest_only_channels:-}" = "yes" ]; then
|
||||
set -- "$@" --allow-guest-only-channels
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
if [ -n "$public_guest_access_regexp" ]; then
|
||||
if [ -n "${public_guest_access_regexp:-}" ]; then
|
||||
set -- "$@" --public-guest-access-regexp="$public_guest_access_regexp"
|
||||
fi
|
||||
|
||||
@ -81,6 +71,8 @@ dockerize \
|
||||
-wait file:///etc/machine-id \
|
||||
-wait file:///var/lib/dbus/machine-id
|
||||
|
||||
registration_conf=${registration_conf:-/etc/kopano/kwmserverd-registration.yaml}
|
||||
|
||||
exec /usr/local/bin/docker-entrypoint.sh serve \
|
||||
--registration-conf /kopano/ssl/konnectd-identifier-registration.yaml \
|
||||
--registration-conf "$registration_conf" \
|
||||
"$@"
|
||||
|
Loading…
x
Reference in New Issue
Block a user