diff --git a/jvb/rootfs/defaults/sip-communicator.properties b/jvb/rootfs/defaults/sip-communicator.properties index 8b1166a..deb1b2a 100644 --- a/jvb/rootfs/defaults/sip-communicator.properties +++ b/jvb/rootfs/defaults/sip-communicator.properties @@ -4,6 +4,10 @@ org.jitsi.videobridge.TCP_HARVESTER_PORT={{ .Env.JVB_TCP_PORT }} {{ if .Env.JVB_STUN_SERVERS }} org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES={{ .Env.JVB_STUN_SERVERS }} {{ end }} +{{ if .Env.DOCKER_HOST_ADDRESS }} +org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS={{ .Env.LOCAL_ADDRESS }} +org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS={{ .Env.DOCKER_HOST_ADDRESS }} +{{ end }} {{ $JVB_TCP_PORT := .Env.JVB_TCP_PORT | default "4443" }} {{ $JVB_TCP_MAPPED_PORT := .Env.JVB_TCP_MAPPED_PORT | default $JVB_TCP_PORT }} {{ if not (eq $JVB_TCP_PORT $JVB_TCP_MAPPED_PORT) }} @@ -28,5 +32,6 @@ org.jitsi.videobridge.rest.COLIBRI_WS_DISABLE=false org.jitsi.videobridge.rest.jetty.port=9090 org.jitsi.videobridge.rest.COLIBRI_WS_DOMAIN={{ $WS_DOMAIN }} org.jitsi.videobridge.rest.COLIBRI_WS_TLS=true +org.jitsi.videobridge.rest.COLIBRI_WS_SERVER_ID={{ .Env.LOCAL_ADDRESS }} org.jitsi.videobridge.rest.private.jetty.host=0.0.0.0 diff --git a/jvb/rootfs/etc/cont-init.d/10-config b/jvb/rootfs/etc/cont-init.d/10-config index 11af52c..542bdf6 100644 --- a/jvb/rootfs/etc/cont-init.d/10-config +++ b/jvb/rootfs/etc/cont-init.d/10-config @@ -1,5 +1,7 @@ #!/usr/bin/with-contenv bash +export LOCAL_ADDRESS=$(ip addr show dev "$(ip route|awk '/^default/ { print $5 }')" | grep -oP '(?<=inet\s)\d+(\.\d+){3}') + if [[ -z $JVB_AUTH_PASSWORD ]]; then echo 'FATAL ERROR: JVB auth password must be set' exit 1 diff --git a/jvb/rootfs/etc/services.d/jvb/run b/jvb/rootfs/etc/services.d/jvb/run index eba2916..169ae9d 100644 --- a/jvb/rootfs/etc/services.d/jvb/run +++ b/jvb/rootfs/etc/services.d/jvb/run @@ -1,16 +1,7 @@ #!/usr/bin/with-contenv bash -JAVA_SYS_PROPS="-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/ -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=config -Djava.util.logging.config.file=/config/logging.properties" - -if [[ ! -z "$DOCKER_HOST_ADDRESS" ]]; then - LOCAL_ADDRESS=$(ip route get "$DOCKER_HOST_ADDRESS" | head -n1 | cut -d " " -f7) - JAVA_SYS_PROPS="$JAVA_SYS_PROPS -Dorg.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=$LOCAL_ADDRESS -Dorg.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=$DOCKER_HOST_ADDRESS" -fi +export JAVA_SYS_PROPS="-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/ -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=config -Djava.util.logging.config.file=/config/logging.properties" DAEMON=/usr/share/jitsi-videobridge/jvb.sh -DEFAULT_DAEMON_OPTS="none" - -DAEMON_OPTS=${JVB_ENABLE_APIS:=$DEFAULT_DAEMON_OPTS} - -exec s6-setuidgid jvb /bin/bash -c "JAVA_SYS_PROPS=\"$JAVA_SYS_PROPS\" exec $DAEMON --apis=${DAEMON_OPTS}" +exec s6-setuidgid jvb /bin/bash -c "exec $DAEMON --apis=${JVB_ENABLE_APIS:="none"}" diff --git a/web/rootfs/defaults/meet.conf b/web/rootfs/defaults/meet.conf index bda34d6..9cf41dd 100644 --- a/web/rootfs/defaults/meet.conf +++ b/web/rootfs/defaults/meet.conf @@ -35,8 +35,8 @@ location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|. } # colibri (JVB) websockets -location ~ ^/colibri-ws/default-id/(.*) { - proxy_pass http://jvb.meet.jitsi:9090/colibri-ws/default-id/$1$is_args$args; +location ~ ^/colibri-ws/([a-zA-Z0-9-\.]+)/(.*) { + proxy_pass http://$1:9090/colibri-ws/$1/$2$is_args$args; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";