From 8f5da0fd01b5b41795a84ba38977c048e2dfdedd Mon Sep 17 00:00:00 2001 From: cruizba Date: Tue, 8 Jul 2025 12:05:37 +0200 Subject: [PATCH] Do not configure LAN_PRIVATE_IP in openvidu if LAN_MODE is not true. --- community/docker-compose.yaml | 1 + community/scripts/entrypoint_openvidu.sh | 3 ++- pro/docker-compose.yaml | 1 + pro/scripts/entrypoint_openvidu.sh | 3 ++- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/community/docker-compose.yaml b/community/docker-compose.yaml index 282c873..cafee20 100644 --- a/community/docker-compose.yaml +++ b/community/docker-compose.yaml @@ -113,6 +113,7 @@ services: - host.docker.internal:host-gateway environment: - LAN_PRIVATE_IP=${LAN_PRIVATE_IP:-} + - LAN_MODE=${LAN_MODE:-false} ports: - 3478:3478/udp - 7881:7881/tcp diff --git a/community/scripts/entrypoint_openvidu.sh b/community/scripts/entrypoint_openvidu.sh index c57888b..73c4cf8 100644 --- a/community/scripts/entrypoint_openvidu.sh +++ b/community/scripts/entrypoint_openvidu.sh @@ -1,7 +1,8 @@ #!/bin/sh set -e -if [ "$LAN_PRIVATE_IP" != "" ]; then +if [ "$LAN_PRIVATE_IP" != "" ] && [ "$LAN_MODE" = 'true' ]; then + echo "Using as NODE_IP: $LAN_PRIVATE_IP" export NODE_IP="$LAN_PRIVATE_IP" fi diff --git a/pro/docker-compose.yaml b/pro/docker-compose.yaml index b9b332d..13d7a41 100644 --- a/pro/docker-compose.yaml +++ b/pro/docker-compose.yaml @@ -112,6 +112,7 @@ services: extra_hosts: - host.docker.internal:host-gateway environment: + - LAN_MODE=${LAN_MODE:-false} - LAN_PRIVATE_IP=${LAN_PRIVATE_IP:-} - OPENVIDU_DEPLOYMENT_TYPE=local - OPENVIDU_ENVIRONMENT=on_premise diff --git a/pro/scripts/entrypoint_openvidu.sh b/pro/scripts/entrypoint_openvidu.sh index fdf3456..2c9e034 100644 --- a/pro/scripts/entrypoint_openvidu.sh +++ b/pro/scripts/entrypoint_openvidu.sh @@ -1,7 +1,8 @@ #!/bin/sh set -e -if [ "$LAN_PRIVATE_IP" != "" ]; then +if [ "$LAN_PRIVATE_IP" != "" ] && [ "$LAN_MODE" = 'true' ]; then + echo "Using as NODE_IP: $LAN_PRIVATE_IP" export NODE_IP="$LAN_PRIVATE_IP" fi