Compare commits

...

2 commits

Author SHA1 Message Date
kjg
00e4fc3748 [turn] create coturn for Task#12025 2023-09-27 11:22:52 +00:00
root
c5dab64583 [turn] create coturn for Task#12025 2023-09-27 11:22:05 +00:00
5 changed files with 110 additions and 0 deletions

6
coturn/.env Normal file
View file

@ -0,0 +1,6 @@
hostname=turn.tws-matrix.ungleich.cloud
listenport=3478
tlsport=5349
minport=49152
maxport=65535
authsecret=iasdfsadfasdfasdfasdffsdfasdfsdfsdf

26
coturn/README.md Normal file
View file

@ -0,0 +1,26 @@
## Usage and Components
Note: as of 2023-09-01 this docker-compose is available internally.
### Versions
* coturn: https://hub.docker.com/r/coturn/coturn/tags
### HOSTNAME for turnserver
* realm: on which domain for turn server
### Sample usage
Setting up turnserver.conf for coturn ...
- set realm "fn.nf"
- set listenport 3487
- set tlslistenport 5349
- set min port 49152
- set max port 65535
- set static-auth-secret weqrdvfdsawerawefsdaf123#@#dsfaf132
```
docker-compose up -d
```

View file

@ -0,0 +1,16 @@
realm=turn.tws-matrix.ungleich.cloud
no-tcp-relay
listening-ip=0.0.0.0
listening-port=3478
tls-listening-port=5349
min-port=49152
max-port=65535
log-file=stdout
verbose
pidfile=/var/tmp/turnserver.pid
#lt-cred-mech
use-auth-secret
static-auth-secret=iasdfsadfasdfasdfasdffsdfasdfsdfsdf
#user=$AUTHUSERNAME:$AUTHPW
pkey=/etc/ssl/private/privkey.pem
cert=/etc/ssl/certs/cert.pem

View file

@ -0,0 +1,21 @@
#!/bin/sh
cat << EOF > /etc/turnserver.conf
realm=$HOSTNAME
no-tcp-relay
listening-ip=0.0.0.0
listening-port=$LISTENPORT
tls-listening-port=$TLSPORT
min-port=$MINPORT
max-port=$MAXPORT
log-file=stdout
verbose
pidfile=/var/tmp/turnserver.pid
#lt-cred-mech
use-auth-secret
static-auth-secret=$AUTHSECRET
#user=$AUTHUSERNAME:$AUTHPW
pkey=/etc/ssl/private/privkey.pem
cert=/etc/ssl/certs/cert.pem
EOF

View file

@ -0,0 +1,41 @@
version: '3.8'
services:
coturn:
image: coturn/coturn:latest
restart: unless-stopped
# environment:
# - HOSTNAME=${hostname}
# - LISTENPORT=${listenport}
# - TLSPORT=${tlsport}
# - MINPORT=${minport}
# - MAXPORT=${maxport}
# - AUTHSECRET=${authsecret}
# ports:
## STUN/TURN
# - "3478:3478"
# - "3478:3478/udp"
# - "3479:3479"
# - "3479:3479/udp"
# - "80:80"
# - "80:80/udp"
## STUN/TURN SSL
# - "5349:5349"
# - "5349:5349/udp"
# - "5350:5350"
# - "5350:5350/udp"
# - "443:443"
# - "443:443/udp"
# - "49152-49252:49152-49252"
# - "49152-49252:49152-49252/udp"
# Relay Ports
# - "49152-65535:49152-65535"
# - "49152-65535:49152-65535/udp"
volumes:
- ./coturn/turnserver.conf:/etc/turnserver.conf
- ./coturn/privkey.pem:/etc/ssl/private/privkey.pem:ro
- ./coturn/cert.pem:/etc/ssl/certs/cert.pem:ro
network_mode: "host"
# command: sh -c "/etc/turnserver.conf.sh"
# entrypoint: sh -c "docker-entrypoint.sh && /etc/turnserver.conf.sh && chmod -R 777 /etc/turnsever.conf"
# depends_on:
# - nginx