basic 2.5 support (bbb-pads, mongo 5.0, ruby 2.7)

This commit is contained in:
chandi 2022-04-03 23:28:49 +02:00
parent 7eb142b43e
commit dfbe11f74d
14 changed files with 77 additions and 28 deletions

View File

@ -21,7 +21,6 @@ x-html5-backend: &html5backend
environment: &html5backend-env
DOMAIN: ${DOMAIN}
CLIENT_TITLE: ${CLIENT_TITLE}
ETHERPAD_API_KEY: ${ETHERPAD_API_KEY}
LISTEN_ONLY_MODE: ${LISTEN_ONLY_MODE:-true}
DISABLE_ECHO_TEST: ${DISABLE_ECHO_TEST:-false}
AUTO_SHARE_WEBCAM: ${AUTO_SHARE_WEBCAM:-false}
@ -164,8 +163,20 @@ services:
bbb-net:
ipv4_address: 10.7.7.4
bbb-pads:
build: mod/bbb-pads
restart: unless-stopped
depends_on:
- redis
- etherpad
environment:
ETHERPAD_API_KEY: ${ETHERPAD_API_KEY}
networks:
bbb-net:
ipv4_address: 10.7.7.18
redis:
image: redis:6.2-alpine
image: redis:7.0-rc-alpine
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
@ -177,7 +188,8 @@ services:
ipv4_address: 10.7.7.5
mongodb:
image: mongo:4.4
container_name: bbb-mongodb
image: mongo:5.0
restart: unless-stopped
volumes:
- ./mod/mongo/mongod.conf:/etc/mongod.conf
@ -231,6 +243,8 @@ services:
extra_hosts:
- host.docker.internal:10.7.7.1
- kurento:10.7.7.1
volumes:
- vol-mediasoup:/var/mediasoup
networks:
bbb-net:
ipv4_address: 10.7.7.10
@ -292,6 +306,7 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- bigbluebutton:/var/bigbluebutton
- vol-mediasoup:/var/mediasoup
tmpfs:
- /var/log/bigbluebutton
environment:
@ -313,12 +328,14 @@ services:
restart: unless-stopped
depends_on:
- redis
- bbb-pads
environment:
DOMAIN: ${DOMAIN}
volumes:
- bigbluebutton:/var/bigbluebutton
- vol-freeswitch:/var/freeswitch/meetings
- vol-kurento:/var/kurento
- vol-mediasoup:/var/mediasoup
tmpfs:
- /var/log/bigbluebutton
- /tmp
@ -366,7 +383,7 @@ services:
{{ if isTrue .Env.ENABLE_COTURN }}
# coturn
coturn:
image: instrumentisto/coturn:4.5
image: coturn/coturn:4.5
restart: unless-stopped
command:
- "--external-ip=${EXTERNAL_IPv4}/${EXTERNAL_IPv4}"
@ -447,6 +464,7 @@ volumes:
bigbluebutton:
vol-freeswitch:
vol-kurento:
vol-mediasoup:
html5-static:
{{ if isTrue .Env.ENABLE_HTTPS_PROXY }}
ssl_data:

18
mod/bbb-pads/Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM node:14.18.1-bullseye-slim AS builder
COPY ./bbb-pads /bbb-pads
RUN cd /bbb-pads && rm -r .git && npm install --production
RUN chmod 777 /bbb-pads/config
# ------------------------------
FROM node:14.18.1-bullseye-slim
RUN apt update && apt install -y jq moreutils \
&& useradd --uid 2003 --user-group bbb-pads
COPY --from=builder /bbb-pads /bbb-pads
USER bbb-pads
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT /entrypoint.sh

15
mod/bbb-pads/entrypoint.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
set -e
TARGET=/bbb-pads/config/settings.json
cp /bbb-pads/config/settings.json.template $TARGET
sed -i "s/ETHERPAD_API_KEY/\"$ETHERPAD_API_KEY\"/g" $TARGET
jq '.etherpad.host = "etherpad"' $TARGET | sponge $TARGET
jq '.express.host = "0.0.0.0"' $TARGET | sponge $TARGET
jq '.redis.host = "redis"' $TARGET | sponge $TARGET
cd /bbb-pads
export NODE_ENV=production
npm start

@ -1 +1 @@
Subproject commit 91b052c2cc4c169f2e381538e4342e894f944dbe
Subproject commit 8328b7744abe664e44b7802142eaa48fade63eae

View File

@ -13,15 +13,11 @@ public:
chat:
enabled: {{ .Env.CHAT_ENABLED }}
startClosed: {{ .Env.CHAT_START_CLOSED }}
note:
pads:
url: https://{{ .Env.DOMAIN }}/pad
private:
app:
host: 0.0.0.0
etherpad:
apikey: {{ .Env.ETHERPAD_API_KEY }}
host: etherpad
port: 9001
redis:
host: redis
port: '6379'

View File

@ -11,7 +11,7 @@ export BIND_IP=0.0.0.0
export LANG=en_US.UTF-8
export INSTANCE_MAX=1
export ENVIRONMENT_TYPE=production
export NODE_VERSION=node-v12.16.1-linux-x64
export NODE_VERSION=node-v14.18.3-linux-x64
export BBB_HTML5_LOCAL_SETTINGS=/app/bbb-html5.yml
if [ "$DEV_MODE" == true ]; then
@ -26,7 +26,7 @@ fi
# if container is the first frontend, do some additional tasks
if [ "$BBB_HTML5_ROLE" == "frontend" ] && [ "$INSTANCE_ID" == "1" ]; then
# delete potential old settings.yml
# copy static files into volume for direct access by nginx
# https://github.com/bigbluebutton/bigbluebutton/issues/10739

View File

@ -4,10 +4,20 @@ set -e
host=${HOSTNAME:-$(hostname -f)}
# shut down again
mongod --pidfilepath /tmp/docker-entrypoint-temp-mongod.pid --shutdown
# restart again binding to 0.0.0.0 to allow a replset with 10.7.7.6
mongod --oplogSize 8 --replSet rs0 --noauth \
--config /tmp/docker-entrypoint-temp-config.json \
--bind_ip 0.0.0.0 --port 27017 \
--tlsMode disabled \
--logpath /proc/1/fd/1 --logappend \
--pidfilepath /tmp/docker-entrypoint-temp-mongod.pid --fork
# init replset with defaults
mongo local --eval "rs.initiate({
mongo 10.7.7.6 --eval "rs.initiate({
_id: 'rs0',
members: [ { _id: 0, host: '127.0.0.1:27017' } ]
members: [ { _id: 0, host: '10.7.7.6:27017' } ]
})"
echo "Waiting to become a master"

View File

@ -13,7 +13,7 @@ location /pad/p/ {
proxy_set_header X-Forwarded-Proto $scheme; # for EP to set secure cookie flag when https is used
proxy_http_version 1.1;
auth_request /bigbluebutton/connection/validatePad;
auth_request /bigbluebutton/connection/checkAuthorization;
auth_request_set $auth_status $upstream_status;
}

View File

@ -1,12 +1,5 @@
FROM debian:bullseye-slim
# -- install mongo cli
RUN apt-get update \
&& apt-get install -y wget libcurl4 \
&& wget https://repo.mongodb.org/apt/debian/dists/buster/mongodb-org/4.2/main/binary-amd64/mongodb-org-shell_4.2.6_amd64.deb \
&& dpkg -i mongodb*.deb \
&& rm mongodb*.deb
# -- install docker cli
COPY --from=library/docker:latest /usr/local/bin/docker /usr/bin/docker

View File

@ -12,7 +12,7 @@ if [ ! -f /tmp/bbb-kms-last-restart.txt ]; then
exit
fi
users=$(mongo --quiet mongodb://10.7.7.6:27017/meteor --eval "db.users.count()")
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

View File

@ -2,5 +2,4 @@
# https://github.com/bigbluebutton/bigbluebutton/pull/9597/files
CONTAINER_ID=$(docker ps | grep freeswitch | awk '{print $1}')
docker exec -it $CONTAINER_ID fs_cli -H 10.7.7.1 -P 8021 -x 'fsctl sync_clock_when_idle'
docker exec -it bbb-freeswitch fs_cli -H 10.7.7.1 -P 8021 -x 'fsctl sync_clock_when_idle'

View File

@ -1,5 +1,5 @@
FROM ruby:2.5-slim-buster
FROM ruby:2.7-slim-buster
# install apt dependencies
RUN apt-get update && apt-get install -y \

View File

@ -7,7 +7,7 @@ raw_screenshare_src: /usr/share/red5/webapps/screenshare/streams
raw_webrtc_deskshare_src: /usr/share/red5/webapps/video-broadcast/streams
raw_deskshare_src: /var/bigbluebutton/deskshare
raw_presentation_src: /var/bigbluebutton
notes_endpoint: http://etherpad:9001/p
notes_endpoint: http://bbb-pads:9002/p
# Specify the notes formats we archive
# txt, doc and odt are also supported
notes_formats:

@ -1 +1 @@
Subproject commit 3dc34eb558ce2f0e230c358580d8e7e1cd9b8f67
Subproject commit a342bfd08d0caf66611addb292da53164a4f7fa4