mirror of https://github.com/OpenVidu/openvidu.git
deployment-openvidu-ce-and-pro: Fixing some turn problems in OpenVidu CE
parent
8fb0398971
commit
ff1b982186
|
@ -373,11 +373,11 @@ Resources:
|
|||
CidrIp: 0.0.0.0/0
|
||||
- IpProtocol: udp
|
||||
FromPort: 40000
|
||||
ToPort: 65535
|
||||
ToPort: 57000
|
||||
CidrIp: 0.0.0.0/0
|
||||
- IpProtocol: tcp
|
||||
FromPort: 40000
|
||||
ToPort: 65535
|
||||
ToPort: 57000
|
||||
CidrIp: 0.0.0.0/0
|
||||
|
||||
Outputs:
|
||||
|
|
|
@ -52,6 +52,7 @@ services:
|
|||
environment:
|
||||
- KMS_MIN_PORT=40000
|
||||
- KMS_MAX_PORT=57000
|
||||
- KMS_EXTERNAL_ADDRESS=auto
|
||||
- GST_DEBUG=${KMS_DEBUG_LEVEL:-}
|
||||
|
||||
redis:
|
||||
|
@ -62,7 +63,7 @@ services:
|
|||
- REDIS_PASSWORD=${OPENVIDU_SECRET}
|
||||
|
||||
coturn:
|
||||
image: openvidu/openvidu-coturn:2.0.0-dev1
|
||||
image: openvidu/openvidu-coturn:2.0.0-dev2
|
||||
restart: on-failure
|
||||
network_mode: host
|
||||
environment:
|
||||
|
@ -74,7 +75,7 @@ services:
|
|||
- MAX_PORT=65535
|
||||
|
||||
nginx:
|
||||
image: openvidu/openvidu-proxy:4.0.0-beta1
|
||||
image: openvidu/openvidu-proxy:4.0.0-dev3
|
||||
restart: on-failure
|
||||
network_mode: host
|
||||
volumes:
|
||||
|
|
|
@ -55,7 +55,7 @@ services:
|
|||
- REDIS_PASSWORD=${OPENVIDU_SECRET}
|
||||
|
||||
coturn:
|
||||
image: openvidu/openvidu-coturn:2.0.0-dev1
|
||||
image: openvidu/openvidu-coturn:2.0.0-dev2
|
||||
restart: on-failure
|
||||
network_mode: host
|
||||
environment:
|
||||
|
@ -63,11 +63,12 @@ services:
|
|||
- TURN_LISTEN_PORT=3478
|
||||
- DB_NAME=0
|
||||
- DB_PASSWORD=${OPENVIDU_SECRET}
|
||||
- MIN_PORT=57001
|
||||
- MIN_PORT=40000
|
||||
- MAX_PORT=65535
|
||||
- TURN_PUBLIC_IP=auto
|
||||
|
||||
nginx:
|
||||
image: openvidu/openvidu-proxy:4.0.0-beta1
|
||||
image: openvidu/openvidu-proxy:4.0.0-dev3
|
||||
restart: on-failure
|
||||
network_mode: host
|
||||
volumes:
|
||||
|
|
|
@ -28,12 +28,12 @@ docker run --rm --name some-redis -d -p 6379:6379 redis
|
|||
Get the ip of the container and after that, run coturn, you can use url as ip too, in this example I am running coturn with nip.io:
|
||||
|
||||
```
|
||||
docker run -it -e REDIS_IP=172.17.0.2 -e DB_NAME=0 -e DB_PASSWORD=turn -e MIN_PORT=40000 -e MAX_PORT=65535 -e TURN_LISTEN_PORT=3478 --network=host openvidu/openvidu-coturn
|
||||
docker run -it -e REDIS_IP=172.17.0.2 -e DB_NAME=0 -e DB_PASSWORD=turn -e MIN_PORT=40000 -e MAX_PORT=65535 -e TURN_PUBLIC_IP=auto -e TURN_LISTEN_PORT=3478 --network=host openvidu/openvidu-coturn
|
||||
```
|
||||
|
||||
## Execute turn locally with fixed username and password
|
||||
```
|
||||
docker run -it -e TURN_USERNAME_PASSWORD=<USER>:<PASSWORD> -e MIN_PORT=40000 -e MAX_PORT=65535 -e TURN_LISTEN_PORT=3478 --network=host openvidu/openvidu-coturn
|
||||
docker run -it -e TURN_PUBLIC_IP=auto -e TURN_USERNAME_PASSWORD=<USER>:<PASSWORD> -e MIN_PORT=40000 -e MAX_PORT=65535 -e TURN_LISTEN_PORT=3478 --network=host openvidu/openvidu-coturn
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ EOF
|
|||
|
||||
# Turn server configuration
|
||||
cat>/etc/turnserver.conf<<EOF
|
||||
external-ip=${TURN_PUBLIC_IP}
|
||||
listening-port=${TURN_LISTEN_PORT}
|
||||
fingerprint
|
||||
lt-cred-mech
|
||||
|
@ -19,6 +18,10 @@ realm=openvidu
|
|||
verbose
|
||||
EOF
|
||||
|
||||
if [[ ! -z "${TURN_PUBLIC_IP}" ]]; then
|
||||
echo "external-ip=${TURN_PUBLIC_IP}" >> /etc/turnserver.conf
|
||||
fi
|
||||
|
||||
if [[ ! -z "${REDIS_IP}" ]] && [[ ! -z "${DB_NAME}" ]] && [[ ! -z "${DB_PASSWORD}" ]]; then
|
||||
echo "redis-userdb=\"ip=${REDIS_IP} dbname=${DB_NAME} password=${DB_PASSWORD} connect_timeout=30\"" >> /etc/turnserver.conf
|
||||
fi
|
||||
|
|
|
@ -5,9 +5,9 @@ DEBUG=${DEBUG:-false}
|
|||
[ "$DEBUG" == "true" ] && set -x
|
||||
|
||||
#Check parameters
|
||||
[[ ! -z "${TURN_PUBLIC_IP}" ]] || export TURN_PUBLIC_IP=$(/usr/local/bin/discover_my_public_ip.sh)
|
||||
[[ "${TURN_PUBLIC_IP}" == "auto" ]] && export TURN_PUBLIC_IP=$(/usr/local/bin/discover_my_public_ip.sh)
|
||||
|
||||
echo "TURN public IP: ${TURN_PUBLIC_IP}"
|
||||
echo "TURN public IP: ${TURN_PUBLIC_IP:-"empty"}"
|
||||
|
||||
[[ ! -z "${TURN_LISTEN_PORT}" ]] && echo "TURN listening port: ${TURN_LISTEN_PORT}" ||
|
||||
{ echo "TURN_LISTEN_PORT environment variable is not defined"; exit 1; }
|
||||
|
|
Loading…
Reference in New Issue