Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

talk - fix eternal relay-ip #3217

Merged
merged 2 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Containers/talk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,9 @@ 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"
ENV ETURNAL_ETC_DIR="/conf"
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

Expand Down Expand Up @@ -97,7 +94,9 @@ RUN set -ex; \
/conf \
/opt/eturnal \
/var/run/supervisord \
/var/log/supervisord;
/var/log/supervisord; \
ln -s /opt/eturnal/bin/stun /usr/local/bin/stun; \
ln -s /opt/eturnal/bin/eturnalctl /usr/local/bin/eturnalctl

USER eturnal
ENTRYPOINT ["/start.sh"]
Expand Down
7 changes: 2 additions & 5 deletions Containers/talk/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ fi
set -x
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)"
Comment on lines 22 to 23
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these two always the container IP addresses?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. In that case, I propose additional changes in the upcoming comment.


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
Expand All @@ -39,8 +36,8 @@ eturnal:
log_dir: stdout
log_level: warning
secret: "$TURN_SECRET"
relay_ipv4_addr: "$IPv4_ADDRESS_NC"
relay_ipv6_addr: "$IPv6_ADDRESS_NC"
relay_ipv4_addr: "$IPv4_ADDRESS_TALK"
relay_ipv6_addr: "$IPv4_ADDRESS_TALK"
blacklist:
- recommended
whitelist:
Expand Down