mirror of
https://github.com/bigbluebutton/docker.git
synced 2025-05-16 21:41:06 +02:00
mediasoup support and partial kurento removal
This commit is contained in:
parent
2c09d17b95
commit
d6e461efd4
@ -70,7 +70,6 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- bigbluebutton:/var/bigbluebutton
|
- bigbluebutton:/var/bigbluebutton
|
||||||
- vol-freeswitch:/var/freeswitch/meetings
|
- vol-freeswitch:/var/freeswitch/meetings
|
||||||
- vol-kurento:/var/kurento
|
|
||||||
networks:
|
networks:
|
||||||
bbb-net:
|
bbb-net:
|
||||||
ipv4_address: 10.7.7.2
|
ipv4_address: 10.7.7.2
|
||||||
@ -149,7 +148,7 @@ services:
|
|||||||
- "host.docker.internal:10.7.7.1"
|
- "host.docker.internal:10.7.7.1"
|
||||||
- "bbb-web:10.7.7.2"
|
- "bbb-web:10.7.7.2"
|
||||||
- "etherpad:10.7.7.4"
|
- "etherpad:10.7.7.4"
|
||||||
- "webrtc-sfu:10.7.7.10"
|
- "webrtc-sfu:10.7.7.1"
|
||||||
- "html5:10.7.7.11"
|
- "html5:10.7.7.11"
|
||||||
|
|
||||||
etherpad:
|
etherpad:
|
||||||
@ -204,8 +203,9 @@ services:
|
|||||||
bbb-net:
|
bbb-net:
|
||||||
ipv4_address: 10.7.7.6
|
ipv4_address: 10.7.7.6
|
||||||
|
|
||||||
|
# TODO: remove as soon as not required anymore by webrtc-sfu
|
||||||
kurento:
|
kurento:
|
||||||
image: kurento/kurento-media-server:6.16
|
image: kurento/kurento-media-server:6.17
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
KMS_STUN_IP: ${STUN_IP}
|
KMS_STUN_IP: ${STUN_IP}
|
||||||
@ -213,11 +213,10 @@ services:
|
|||||||
KMS_MIN_PORT: 24577
|
KMS_MIN_PORT: 24577
|
||||||
KMS_MAX_PORT: 32768
|
KMS_MAX_PORT: 32768
|
||||||
KMS_TURN_URL:
|
KMS_TURN_URL:
|
||||||
KMS_NETWORK_INTERFACES: ${NETWORK_INTERFACE:-}
|
|
||||||
GST_DEBUG: 3,Kurento*:4,kms*:4,KurentoWebSocketTransport:5
|
GST_DEBUG: 3,Kurento*:4,kms*:4,KurentoWebSocketTransport:5
|
||||||
network_mode: host
|
network_mode: host
|
||||||
volumes:
|
tmpfs:
|
||||||
- vol-kurento:/var/kurento
|
- /var/kurento
|
||||||
|
|
||||||
webrtc-sfu:
|
webrtc-sfu:
|
||||||
build:
|
build:
|
||||||
@ -227,27 +226,21 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
- kurento
|
- freeswitch
|
||||||
environment:
|
environment:
|
||||||
CLIENT_HOST: 0.0.0.0
|
CLIENT_HOST: 10.7.7.1
|
||||||
KURENTO_NAME: kurento
|
REDIS_HOST: 10.7.7.5
|
||||||
REDIS_HOST: redis
|
FREESWITCH_IP: 10.7.7.1
|
||||||
FREESWITCH_IP: host.docker.internal
|
|
||||||
FREESWITCH_SIP_IP: ${EXTERNAL_IPv4}
|
FREESWITCH_SIP_IP: ${EXTERNAL_IPv4}
|
||||||
ESL_IP: host.docker.internal
|
ESL_IP: 10.7.7.1
|
||||||
ESL_PASSWORD: ${FSESL_PASSWORD:-ClueCon}
|
ESL_PASSWORD: ${FSESL_PASSWORD:-ClueCon}
|
||||||
LOG_LEVEL: info
|
# TODO: add mediasoup IPv6
|
||||||
NODE_CONFIG: '{"kurento":[{"ip":"${EXTERNAL_IPv4}","url":"ws://kurento:8888/kurento"}]}'
|
# TODO: can listen to 0.0.0.0 for nat support? https://github.com/versatica/mediasoup/issues/487
|
||||||
ports:
|
MS_WEBRTC_LISTEN_IPS: '[{"ip":"${EXTERNAL_IPv4}", "announcedIp":"${EXTERNAL_IPv4}"}]'
|
||||||
- "127.0.0.1:3008:3008"
|
MS_RTP_LISTEN_IP: '{"ip":"0.0.0.0", "announcedIp":"${EXTERNAL_IPv4}"}'
|
||||||
extra_hosts:
|
|
||||||
- host.docker.internal:10.7.7.1
|
|
||||||
- kurento:10.7.7.1
|
|
||||||
volumes:
|
volumes:
|
||||||
- vol-mediasoup:/var/mediasoup
|
- vol-mediasoup:/var/mediasoup
|
||||||
networks:
|
network_mode: host
|
||||||
bbb-net:
|
|
||||||
ipv4_address: 10.7.7.10
|
|
||||||
|
|
||||||
fsesl-akka:
|
fsesl-akka:
|
||||||
build:
|
build:
|
||||||
@ -334,7 +327,6 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- bigbluebutton:/var/bigbluebutton
|
- bigbluebutton:/var/bigbluebutton
|
||||||
- vol-freeswitch:/var/freeswitch/meetings
|
- vol-freeswitch:/var/freeswitch/meetings
|
||||||
- vol-kurento:/var/kurento
|
|
||||||
- vol-mediasoup:/var/mediasoup
|
- vol-mediasoup:/var/mediasoup
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /var/log/bigbluebutton
|
- /var/log/bigbluebutton
|
||||||
@ -463,7 +455,6 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
bigbluebutton:
|
bigbluebutton:
|
||||||
vol-freeswitch:
|
vol-freeswitch:
|
||||||
vol-kurento:
|
|
||||||
vol-mediasoup:
|
vol-mediasoup:
|
||||||
html5-static:
|
html5-static:
|
||||||
{{ if isTrue .Env.ENABLE_HTTPS_PROXY }}
|
{{ 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 $meeting_id $sent_http_meeting_id;
|
||||||
auth_request_set $voice_bridge $sent_http_voice_bridge;
|
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_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "Upgrade";
|
proxy_set_header Connection "Upgrade";
|
||||||
|
@ -3,7 +3,7 @@ FROM debian:bullseye-slim
|
|||||||
# -- install docker cli
|
# -- install docker cli
|
||||||
COPY --from=library/docker:latest /usr/local/bin/docker /usr/bin/docker
|
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
|
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 :
|
while :
|
||||||
do
|
do
|
||||||
# restart kurento after 24h
|
|
||||||
/bbb-restart-kms
|
|
||||||
|
|
||||||
# resync freeswitch
|
# resync freeswitch
|
||||||
/bbb-resync-freeswitch
|
/bbb-resync-freeswitch
|
||||||
|
@ -30,8 +30,6 @@ ENV NODE_ENV production
|
|||||||
COPY --from=builder /app /app
|
COPY --from=builder /app /app
|
||||||
RUN chown -R webrtc-sfu:webrtc-sfu /app/config
|
RUN chown -R webrtc-sfu:webrtc-sfu /app/config
|
||||||
|
|
||||||
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
|
|
||||||
|
|
||||||
USER webrtc-sfu
|
USER webrtc-sfu
|
||||||
ENTRYPOINT [ "/app/docker-entrypoint.sh" ]
|
WORKDIR /app
|
||||||
CMD [ "npm", "start" ]
|
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_IPv4=144.76.97.10
|
||||||
EXTERNAL_IPv6=
|
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 SERVER
|
||||||
# stun.freeswitch.org
|
# stun.freeswitch.org
|
||||||
STUN_IP=216.93.246.18
|
STUN_IP=216.93.246.18
|
||||||
|
Loading…
Reference in New Issue
Block a user