add turn server config

This commit is contained in:
holzi1005 2025-06-16 15:55:29 +02:00
parent d9776809b4
commit 5defe923fc
3 changed files with 18 additions and 2 deletions

View file

@ -25,7 +25,7 @@ services:
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "8443:443"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:

View file

@ -7,6 +7,11 @@ rtc:
port_range_end: 60000
use_external_ip: false
enable_loopback_candidate: false
turn_servers:
- host: <turnUrl>
port: 443
protocol: tls
credential: <turnSecret>
redis:
address: 127.0.0.1:6379
keys:

View file

@ -35,12 +35,14 @@ else
KEYCLOAK_ADMIN_PW=$(date +%s | sha256sum | base64 | head -c 32)
NEW_UUID=$(date +%s | sha256sum | base64 | head -c 32)
LIVEKIT_KEY=$(date +%s | sha256sum | base64 | head -c 32)
COTURN_KEY=$(date +%s | sha256sum | base64 | head -c 32)
echo "KEYCLOAK_PW=$KEYCLOAK_PW" >> $FILE
echo "JITSI_ADMIN_PW=$JITSI_ADMIN_PW" >> $FILE
echo "MERCURE_JWT_SECRET=$MERCURE_JWT_SECRET" >> $FILE
echo "KEYCLOAK_ADMIN_PW=$KEYCLOAK_ADMIN_PW" >> $FILE
echo "NEW_UUID=$NEW_UUID" >> $FILE
echo "LIVEKIT_KEY=$LIVEKIT_KEY" >> $FILE
echo "COTURN_KEY=$COTURN_KEY" >> $FILE
source $FILE
fi
@ -74,6 +76,12 @@ fi
LIVEKIT_URL=${input:=$LIVEKIT_URL}
sed -i '/LIVEKIT_URL/d' $FILE
echo "LIVEKIT_URL=$LIVEKIT_URL" >> $FILE
TURN_URL=${TURN_URL:=turn-dev.domain.de}
read -p "Enter the url for your Turn Server (no http/https) [$TURN_URL]: " input
TURN_URL=${input:=$TURN_URL}
sed -i '/TURN_URL/d' $FILE
echo "TURN_URL=$TURN_URL" >> $FILE
fi
default_language=${default_language:=en}
@ -170,9 +178,12 @@ if [ "$ENVIRONMENT" = "livekit" ]; then
cp .templates/livekit.yaml livekit/livekit.yaml
sed -i "s|<secret>|$LIVEKIT_KEY|g" livekit/livekit.yaml
sed -i "s|<keycloak-pw>|$KEYCLOAK_PW|g" livekit/livekit.yaml
sed -i "s|<turnUrl>|$TURN_URL|g" livekit/livekit.yaml
sed -i "s|<turnSecret>|$COTURN_KEY|g" livekit/livekit.yaml
cp .templates/traefik-livekit.yaml traefik/config.yaml
sed -i "s|<livekitUrl>|$LIVEKIT_URL|g" traefik/config.yaml
fi
echo ------------------------------------------------------------