Merge pull request #3275 from gravitl/NET-1784-script

handle ip check gracefully
This commit is contained in:
Abhishek K 2024-12-28 19:42:14 +04:00 committed by GitHub
commit 271c3f2af5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View file

@ -12,7 +12,7 @@ services:
- sqldata:/root/data
environment:
# config-dependant vars
- STUN_SERVERS=stun1.netmaker.io:3478,stun2.netmaker.io:3478,stun1.l.google.com:19302,stun2.l.google.com:19302
- STUN_SERVERS=stun1.l.google.com:19302,stun2.l.google.com:19302,stun3.l.google.com:19302,stun4.l.google.com:19302
# The domain/host IP indicating the mq broker address
- BROKER_ENDPOINT=wss://broker.${NM_DOMAIN} # For EMQX broker use `BROKER_ENDPOINT=wss://broker.${NM_DOMAIN}/mqtt`
# For EMQX broker (uncomment the two lines below)
@ -52,11 +52,11 @@ services:
- caddy_data:/data
- caddy_conf:/config
ports:
- "$SERVER_HOST:80:80"
- "$SERVER_HOST:443:443"
- "$SERVER_HOST:80:80/tcp"
- "$SERVER_HOST:443:443/tcp"
#uncomment to enable IPv6 communication
# - "$SERVER_HOST6:80:80"
# - "$SERVER_HOST6:443:443"
# - "$SERVER_HOST6:80:80/tcp"
# - "$SERVER_HOST6:443:443/tcp"
coredns:
#network_mode: host

View file

@ -509,8 +509,8 @@ set -e
# set_install_vars - sets the variables that will be used throughout installation
set_install_vars() {
IP_ADDR=$(curl -s -4 ifconfig.me)
IP6_ADDR=$(curl -s -6 ifconfig.me)
IP_ADDR=$(curl -s -4 ifconfig.me || echo "")
IP6_ADDR=$(curl -s -6 ifconfig.me || echo "")
if [ "$NETMAKER_BASE_DOMAIN" = "" ]; then
NETMAKER_BASE_DOMAIN=nm.$(echo $IP_ADDR | tr . -).nip.io
fi