enable stun auto detection

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey 2023-08-07 13:15:41 +02:00
parent aeae72f5ba
commit 9d154557f8
No known key found for this signature in database
GPG key ID: 02A3919EB4F67328
2 changed files with 7 additions and 8 deletions

View file

@ -34,9 +34,11 @@ RUN set -ex; \
rename -v ".jcfg.sample" ".jcfg" /usr/local/etc/janus/*.jcfg.sample
FROM alpine:3.18.2
ENV STUN_SERVICE="stun.nextcloud.com 443"
COPY --from=janus /usr/local /usr/local
COPY --from=eturnal /opt/eturnal /opt/eturnal
COPY --from=eturnal /usr/local/bin/stun /usr/local/bin/stun
COPY --from=eturnal /usr/local/bin/eturnalctl /usr/local/bin/eturnalctl
COPY --from=nats /nats-server /usr/local/bin/nats-server
COPY --from=signaling /usr/bin/nextcloud-spreed-signaling /usr/local/bin/nextcloud-spreed-signaling

View file

@ -19,14 +19,11 @@ elif [ -z "$INTERNAL_SECRET" ]; then
fi
set -x
IPv4_ADDRESS_TALK="$(dig nextcloud-aio-talk A +short | grep -E "^[0-9.]+$" | sort | head -n1)"
IPv6_ADDRESS_TALK="$(dig nextcloud-aio-talk AAAA +short | grep -E "^[0-9a-f:]+$" | sort | head -n1)"
IPv4_ADDRESS_TALK="$(dig nextcloud-aio-talk IN A +short | grep '^[0-9.]\+$' | sort | head -n1)"
IPv6_ADDRESS_TALK="$(dig nextcloud-aio-talk AAAA +short | grep '^[0-9a-f:]\+$' | sort | head -n1)"
IPv4_ADDRESS_NC="$(dig "$NC_DOMAIN" A +short +https +tls-ca=/etc/ssl/certs/ca-certificates.crt @1.1.1.1 | grep "^[0-9.]\+$" | sort | head -n1)"
IPv6_ADDRESS_NC="$(dig "$NC_DOMAIN" AAAA +short +https +tls-ca=/etc/ssl/certs/ca-certificates.crt @1.1.1.1 | grep "^[0-9a-f:]\+$" | sort | head -n1)"
#if [ -z "$IPv4_ADDRESS_NC" ] && [ -z "$IPv6_ADDRESS_NC" ]; then
# export STUN_SERVICE="stun.nextcloud.com 443"
#fi
IPv4_ADDRESS_NC="$(dig "$NC_DOMAIN" IN A +short +https +tls-ca=/etc/ssl/certs/ca-certificates.crt @1.1.1.1 | grep '^[0-9.]\+$' | sort | head -n1)"
IPv6_ADDRESS_NC="$(dig "$NC_DOMAIN" IN AAAA +short +https +tls-ca=/etc/ssl/certs/ca-certificates.crt @1.1.1.1 | grep '^[0-9a-f:]\+$' | sort | head -n1)"
set +x
# Turn