openvidu/openvidu-server/docker/openvidu-coturn
cruizba 499bd8afc5 Parametrized create_image.sh scripts for CI 2020-06-23 12:11:54 +02:00
..
Dockerfile copy discover_my_public_ip.sh when create image 2020-05-08 12:03:34 +02:00
README.md Add docker-compose and corturn image 2020-03-24 12:08:36 +01:00
configuration-files.sh Add docker-compose and corturn image 2020-03-24 12:08:36 +01:00
create_image.sh Parametrized create_image.sh scripts for CI 2020-06-23 12:11:54 +02:00
entrypoint.sh discover_my_public_ip script added 2020-04-21 13:00:46 +02:00

README.md

Coturn OpenVidu

This is a docker image to launch a coturn server. Environment variables can be defined to modify the files /etc/default/coturn and cat>/etc/turnserver.conf.

Environment variables

Turn configuration

  • TURN_PUBLIC_IP: Public ip where coturn will be placed. If this environment variable is not setted, it will get the ip returned by curl ifconfig.co.
  • TURN_LISTEN_PORT: Port where turn will be listening.

Turn credentials

  • REDIS_IP: Redis where credentials are stored
  • DB_NAME: Name of the database in redis
  • DB_PASSWORD: Password of the redis database

Execution example

Actual version of OpenVidu need to be located in the same node because tokens sends the url for turn/stun connections with the host url.

Execute turn locally next to the redis database

You need to have a redis database running:

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 coturn-openvidu

Kubernetes

TODO