mirror of
https://github.com/bigbluebutton/docker.git
synced 2025-01-11 16:28:18 +01:00
mediasoup support and partial kurento removal
This commit is contained in:
parent
2c09d17b95
commit
d6e461efd4
@ -70,7 +70,6 @@ services:
|
||||
volumes:
|
||||
- bigbluebutton:/var/bigbluebutton
|
||||
- vol-freeswitch:/var/freeswitch/meetings
|
||||
- vol-kurento:/var/kurento
|
||||
networks:
|
||||
bbb-net:
|
||||
ipv4_address: 10.7.7.2
|
||||
@ -149,7 +148,7 @@ services:
|
||||
- "host.docker.internal:10.7.7.1"
|
||||
- "bbb-web:10.7.7.2"
|
||||
- "etherpad:10.7.7.4"
|
||||
- "webrtc-sfu:10.7.7.10"
|
||||
- "webrtc-sfu:10.7.7.1"
|
||||
- "html5:10.7.7.11"
|
||||
|
||||
etherpad:
|
||||
@ -204,8 +203,9 @@ services:
|
||||
bbb-net:
|
||||
ipv4_address: 10.7.7.6
|
||||
|
||||
# TODO: remove as soon as not required anymore by webrtc-sfu
|
||||
kurento:
|
||||
image: kurento/kurento-media-server:6.16
|
||||
image: kurento/kurento-media-server:6.17
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
KMS_STUN_IP: ${STUN_IP}
|
||||
@ -213,11 +213,10 @@ services:
|
||||
KMS_MIN_PORT: 24577
|
||||
KMS_MAX_PORT: 32768
|
||||
KMS_TURN_URL:
|
||||
KMS_NETWORK_INTERFACES: ${NETWORK_INTERFACE:-}
|
||||
GST_DEBUG: 3,Kurento*:4,kms*:4,KurentoWebSocketTransport:5
|
||||
network_mode: host
|
||||
volumes:
|
||||
- vol-kurento:/var/kurento
|
||||
tmpfs:
|
||||
- /var/kurento
|
||||
|
||||
webrtc-sfu:
|
||||
build:
|
||||
@ -227,27 +226,21 @@ services:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- redis
|
||||
- kurento
|
||||
- freeswitch
|
||||
environment:
|
||||
CLIENT_HOST: 0.0.0.0
|
||||
KURENTO_NAME: kurento
|
||||
REDIS_HOST: redis
|
||||
FREESWITCH_IP: host.docker.internal
|
||||
CLIENT_HOST: 10.7.7.1
|
||||
REDIS_HOST: 10.7.7.5
|
||||
FREESWITCH_IP: 10.7.7.1
|
||||
FREESWITCH_SIP_IP: ${EXTERNAL_IPv4}
|
||||
ESL_IP: host.docker.internal
|
||||
ESL_IP: 10.7.7.1
|
||||
ESL_PASSWORD: ${FSESL_PASSWORD:-ClueCon}
|
||||
LOG_LEVEL: info
|
||||
NODE_CONFIG: '{"kurento":[{"ip":"${EXTERNAL_IPv4}","url":"ws://kurento:8888/kurento"}]}'
|
||||
ports:
|
||||
- "127.0.0.1:3008:3008"
|
||||
extra_hosts:
|
||||
- host.docker.internal:10.7.7.1
|
||||
- kurento:10.7.7.1
|
||||
# TODO: add mediasoup IPv6
|
||||
# TODO: can listen to 0.0.0.0 for nat support? https://github.com/versatica/mediasoup/issues/487
|
||||
MS_WEBRTC_LISTEN_IPS: '[{"ip":"${EXTERNAL_IPv4}", "announcedIp":"${EXTERNAL_IPv4}"}]'
|
||||
MS_RTP_LISTEN_IP: '{"ip":"0.0.0.0", "announcedIp":"${EXTERNAL_IPv4}"}'
|
||||
volumes:
|
||||
- vol-mediasoup:/var/mediasoup
|
||||
networks:
|
||||
bbb-net:
|
||||
ipv4_address: 10.7.7.10
|
||||
network_mode: host
|
||||
|
||||
fsesl-akka:
|
||||
build:
|
||||
@ -334,7 +327,6 @@ services:
|
||||
volumes:
|
||||
- bigbluebutton:/var/bigbluebutton
|
||||
- vol-freeswitch:/var/freeswitch/meetings
|
||||
- vol-kurento:/var/kurento
|
||||
- vol-mediasoup:/var/mediasoup
|
||||
tmpfs:
|
||||
- /var/log/bigbluebutton
|
||||
@ -463,7 +455,6 @@ services:
|
||||
volumes:
|
||||
bigbluebutton:
|
||||
vol-freeswitch:
|
||||
vol-kurento:
|
||||
vol-mediasoup:
|
||||
html5-static:
|
||||
{{ if isTrue .Env.ENABLE_HTTPS_PROXY }}
|
||||
|
@ -6,7 +6,7 @@ location /bbb-webrtc-sfu {
|
||||
auth_request_set $meeting_id $sent_http_meeting_id;
|
||||
auth_request_set $voice_bridge $sent_http_voice_bridge;
|
||||
|
||||
proxy_pass http://webrtc-sfu:3008;
|
||||
proxy_pass http://10.7.7.1:3008;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
|
@ -3,7 +3,7 @@ FROM debian:bullseye-slim
|
||||
# -- install docker cli
|
||||
COPY --from=library/docker:latest /usr/local/bin/docker /usr/bin/docker
|
||||
|
||||
COPY bbb-remove-old-recordings bbb-restart-kms bbb-resync-freeswitch entrypoint.sh /
|
||||
COPY bbb-remove-old-recordings bbb-resync-freeswitch entrypoint.sh /
|
||||
|
||||
RUN chmod +x bbb-remove-old-recordings
|
||||
|
||||
|
@ -1,40 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Source:
|
||||
# https://github.com/alangecker/bbb-packages/blob/f83431c227be2c95025ea81083baeaa87667b170/bbb-webrtc-sfu/data/etc/cron.hourly/bbb-restart-kms
|
||||
|
||||
#
|
||||
# Restart Kurento every 24+ hours
|
||||
#
|
||||
|
||||
if [ ! -f /tmp/bbb-kms-last-restart.txt ]; then
|
||||
date +%Y-%m-%d\ %H:%M:%S > /tmp/bbb-kms-last-restart.txt
|
||||
exit
|
||||
fi
|
||||
|
||||
users=$(docker exec bbb-mongodb mongo --quiet mongodb://10.7.7.6:27017/meteor --eval "db.users.count()")
|
||||
echo "currently active users: $users"
|
||||
|
||||
if [ "$users" -eq 0 ]; then
|
||||
|
||||
# Make sure 24 hours have passed since last restart
|
||||
|
||||
# Seconds since epoch for last restart
|
||||
dt1=$(cat /tmp/bbb-kms-last-restart.txt)
|
||||
t1=`date --date="$dt1" +%s`
|
||||
|
||||
# Current seconds since epoch
|
||||
dt2=`date +%Y-%m-%d\ %H:%M:%S`
|
||||
t2=`date --date="$dt2" +%s`
|
||||
|
||||
# Hours since last restart
|
||||
let "tDiff=$t2-$t1"
|
||||
let "hDiff=$tDiff/3600"
|
||||
|
||||
if [ "$hDiff" -ge 24 ]; then
|
||||
echo "scheduled restart of kurento after 24h"
|
||||
CONTAINER_ID=$(docker ps | grep kurento | awk '{print $1}')
|
||||
docker restart $CONTAINER_ID
|
||||
date +%Y-%m-%d\ %H:%M:%S > /tmp/bbb-kms-last-restart.txt
|
||||
fi
|
||||
fi
|
@ -7,8 +7,6 @@ history=5
|
||||
|
||||
while :
|
||||
do
|
||||
# restart kurento after 24h
|
||||
/bbb-restart-kms
|
||||
|
||||
# resync freeswitch
|
||||
/bbb-resync-freeswitch
|
||||
|
@ -30,8 +30,6 @@ ENV NODE_ENV production
|
||||
COPY --from=builder /app /app
|
||||
RUN chown -R webrtc-sfu:webrtc-sfu /app/config
|
||||
|
||||
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
|
||||
|
||||
USER webrtc-sfu
|
||||
ENTRYPOINT [ "/app/docker-entrypoint.sh" ]
|
||||
WORKDIR /app
|
||||
CMD [ "npm", "start" ]
|
||||
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
cd /app
|
||||
sed -i "s|^\(localIpAddress\):.*|\1: \"10.7.7.10\"|g" config/production.yml
|
||||
export KURENTO_IP="10.7.7.1"
|
||||
|
||||
exec "$@"
|
@ -59,11 +59,6 @@ DOMAIN=bbb.example.com
|
||||
EXTERNAL_IPv4=144.76.97.10
|
||||
EXTERNAL_IPv6=
|
||||
|
||||
# setting the network interface speeds up kurentos WebRTC connection time,
|
||||
# but currently also disables IPv6 for Kurento
|
||||
# (https://github.com/Kurento/bugtracker/issues/500)
|
||||
#NETWORK_INTERFACE=ens3
|
||||
|
||||
# STUN SERVER
|
||||
# stun.freeswitch.org
|
||||
STUN_IP=216.93.246.18
|
||||
|
Loading…
Reference in New Issue
Block a user