forked from extern/docker
basic 2.5 support (bbb-pads, mongo 5.0, ruby 2.7)
This commit is contained in:
parent
7eb142b43e
commit
dfbe11f74d
@ -21,7 +21,6 @@ x-html5-backend: &html5backend
|
|||||||
environment: &html5backend-env
|
environment: &html5backend-env
|
||||||
DOMAIN: ${DOMAIN}
|
DOMAIN: ${DOMAIN}
|
||||||
CLIENT_TITLE: ${CLIENT_TITLE}
|
CLIENT_TITLE: ${CLIENT_TITLE}
|
||||||
ETHERPAD_API_KEY: ${ETHERPAD_API_KEY}
|
|
||||||
LISTEN_ONLY_MODE: ${LISTEN_ONLY_MODE:-true}
|
LISTEN_ONLY_MODE: ${LISTEN_ONLY_MODE:-true}
|
||||||
DISABLE_ECHO_TEST: ${DISABLE_ECHO_TEST:-false}
|
DISABLE_ECHO_TEST: ${DISABLE_ECHO_TEST:-false}
|
||||||
AUTO_SHARE_WEBCAM: ${AUTO_SHARE_WEBCAM:-false}
|
AUTO_SHARE_WEBCAM: ${AUTO_SHARE_WEBCAM:-false}
|
||||||
@ -164,8 +163,20 @@ services:
|
|||||||
bbb-net:
|
bbb-net:
|
||||||
ipv4_address: 10.7.7.4
|
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:
|
redis:
|
||||||
image: redis:6.2-alpine
|
image: redis:7.0-rc-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "redis-cli", "ping"]
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
@ -177,7 +188,8 @@ services:
|
|||||||
ipv4_address: 10.7.7.5
|
ipv4_address: 10.7.7.5
|
||||||
|
|
||||||
mongodb:
|
mongodb:
|
||||||
image: mongo:4.4
|
container_name: bbb-mongodb
|
||||||
|
image: mongo:5.0
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./mod/mongo/mongod.conf:/etc/mongod.conf
|
- ./mod/mongo/mongod.conf:/etc/mongod.conf
|
||||||
@ -231,6 +243,8 @@ services:
|
|||||||
extra_hosts:
|
extra_hosts:
|
||||||
- host.docker.internal:10.7.7.1
|
- host.docker.internal:10.7.7.1
|
||||||
- kurento:10.7.7.1
|
- kurento:10.7.7.1
|
||||||
|
volumes:
|
||||||
|
- vol-mediasoup:/var/mediasoup
|
||||||
networks:
|
networks:
|
||||||
bbb-net:
|
bbb-net:
|
||||||
ipv4_address: 10.7.7.10
|
ipv4_address: 10.7.7.10
|
||||||
@ -292,6 +306,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
- bigbluebutton:/var/bigbluebutton
|
- bigbluebutton:/var/bigbluebutton
|
||||||
|
- vol-mediasoup:/var/mediasoup
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /var/log/bigbluebutton
|
- /var/log/bigbluebutton
|
||||||
environment:
|
environment:
|
||||||
@ -313,12 +328,14 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
|
- bbb-pads
|
||||||
environment:
|
environment:
|
||||||
DOMAIN: ${DOMAIN}
|
DOMAIN: ${DOMAIN}
|
||||||
volumes:
|
volumes:
|
||||||
- bigbluebutton:/var/bigbluebutton
|
- bigbluebutton:/var/bigbluebutton
|
||||||
- vol-freeswitch:/var/freeswitch/meetings
|
- vol-freeswitch:/var/freeswitch/meetings
|
||||||
- vol-kurento:/var/kurento
|
- vol-kurento:/var/kurento
|
||||||
|
- vol-mediasoup:/var/mediasoup
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /var/log/bigbluebutton
|
- /var/log/bigbluebutton
|
||||||
- /tmp
|
- /tmp
|
||||||
@ -366,7 +383,7 @@ services:
|
|||||||
{{ if isTrue .Env.ENABLE_COTURN }}
|
{{ if isTrue .Env.ENABLE_COTURN }}
|
||||||
# coturn
|
# coturn
|
||||||
coturn:
|
coturn:
|
||||||
image: instrumentisto/coturn:4.5
|
image: coturn/coturn:4.5
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command:
|
command:
|
||||||
- "--external-ip=${EXTERNAL_IPv4}/${EXTERNAL_IPv4}"
|
- "--external-ip=${EXTERNAL_IPv4}/${EXTERNAL_IPv4}"
|
||||||
@ -447,6 +464,7 @@ volumes:
|
|||||||
bigbluebutton:
|
bigbluebutton:
|
||||||
vol-freeswitch:
|
vol-freeswitch:
|
||||||
vol-kurento:
|
vol-kurento:
|
||||||
|
vol-mediasoup:
|
||||||
html5-static:
|
html5-static:
|
||||||
{{ if isTrue .Env.ENABLE_HTTPS_PROXY }}
|
{{ if isTrue .Env.ENABLE_HTTPS_PROXY }}
|
||||||
ssl_data:
|
ssl_data:
|
||||||
|
18
mod/bbb-pads/Dockerfile
Normal file
18
mod/bbb-pads/Dockerfile
Normal 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
15
mod/bbb-pads/entrypoint.sh
Executable 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
|
@ -13,15 +13,11 @@ public:
|
|||||||
chat:
|
chat:
|
||||||
enabled: {{ .Env.CHAT_ENABLED }}
|
enabled: {{ .Env.CHAT_ENABLED }}
|
||||||
startClosed: {{ .Env.CHAT_START_CLOSED }}
|
startClosed: {{ .Env.CHAT_START_CLOSED }}
|
||||||
note:
|
pads:
|
||||||
url: https://{{ .Env.DOMAIN }}/pad
|
url: https://{{ .Env.DOMAIN }}/pad
|
||||||
private:
|
private:
|
||||||
app:
|
app:
|
||||||
host: 0.0.0.0
|
host: 0.0.0.0
|
||||||
etherpad:
|
|
||||||
apikey: {{ .Env.ETHERPAD_API_KEY }}
|
|
||||||
host: etherpad
|
|
||||||
port: 9001
|
|
||||||
redis:
|
redis:
|
||||||
host: redis
|
host: redis
|
||||||
port: '6379'
|
port: '6379'
|
||||||
|
@ -11,7 +11,7 @@ export BIND_IP=0.0.0.0
|
|||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
export INSTANCE_MAX=1
|
export INSTANCE_MAX=1
|
||||||
export ENVIRONMENT_TYPE=production
|
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
|
export BBB_HTML5_LOCAL_SETTINGS=/app/bbb-html5.yml
|
||||||
|
|
||||||
if [ "$DEV_MODE" == true ]; then
|
if [ "$DEV_MODE" == true ]; then
|
||||||
@ -26,7 +26,7 @@ fi
|
|||||||
|
|
||||||
# if container is the first frontend, do some additional tasks
|
# if container is the first frontend, do some additional tasks
|
||||||
if [ "$BBB_HTML5_ROLE" == "frontend" ] && [ "$INSTANCE_ID" == "1" ]; then
|
if [ "$BBB_HTML5_ROLE" == "frontend" ] && [ "$INSTANCE_ID" == "1" ]; then
|
||||||
# delete potential old settings.yml
|
|
||||||
|
|
||||||
# copy static files into volume for direct access by nginx
|
# copy static files into volume for direct access by nginx
|
||||||
# https://github.com/bigbluebutton/bigbluebutton/issues/10739
|
# https://github.com/bigbluebutton/bigbluebutton/issues/10739
|
||||||
|
@ -4,10 +4,20 @@ set -e
|
|||||||
|
|
||||||
host=${HOSTNAME:-$(hostname -f)}
|
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
|
# init replset with defaults
|
||||||
mongo local --eval "rs.initiate({
|
mongo 10.7.7.6 --eval "rs.initiate({
|
||||||
_id: 'rs0',
|
_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"
|
echo "Waiting to become a master"
|
||||||
|
@ -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_set_header X-Forwarded-Proto $scheme; # for EP to set secure cookie flag when https is used
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
|
||||||
auth_request /bigbluebutton/connection/validatePad;
|
auth_request /bigbluebutton/connection/checkAuthorization;
|
||||||
auth_request_set $auth_status $upstream_status;
|
auth_request_set $auth_status $upstream_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
FROM debian:bullseye-slim
|
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
|
# -- 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
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ if [ ! -f /tmp/bbb-kms-last-restart.txt ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
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"
|
echo "currently active users: $users"
|
||||||
|
|
||||||
if [ "$users" -eq 0 ]; then
|
if [ "$users" -eq 0 ]; then
|
||||||
|
@ -2,5 +2,4 @@
|
|||||||
|
|
||||||
# https://github.com/bigbluebutton/bigbluebutton/pull/9597/files
|
# https://github.com/bigbluebutton/bigbluebutton/pull/9597/files
|
||||||
|
|
||||||
CONTAINER_ID=$(docker ps | grep freeswitch | awk '{print $1}')
|
docker exec -it bbb-freeswitch fs_cli -H 10.7.7.1 -P 8021 -x 'fsctl sync_clock_when_idle'
|
||||||
docker exec -it $CONTAINER_ID fs_cli -H 10.7.7.1 -P 8021 -x 'fsctl sync_clock_when_idle'
|
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
FROM ruby:2.5-slim-buster
|
FROM ruby:2.7-slim-buster
|
||||||
|
|
||||||
# install apt dependencies
|
# install apt dependencies
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
|
@ -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_webrtc_deskshare_src: /usr/share/red5/webapps/video-broadcast/streams
|
||||||
raw_deskshare_src: /var/bigbluebutton/deskshare
|
raw_deskshare_src: /var/bigbluebutton/deskshare
|
||||||
raw_presentation_src: /var/bigbluebutton
|
raw_presentation_src: /var/bigbluebutton
|
||||||
notes_endpoint: http://etherpad:9001/p
|
notes_endpoint: http://bbb-pads:9002/p
|
||||||
# Specify the notes formats we archive
|
# Specify the notes formats we archive
|
||||||
# txt, doc and odt are also supported
|
# txt, doc and odt are also supported
|
||||||
notes_formats:
|
notes_formats:
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 3dc34eb558ce2f0e230c358580d8e7e1cd9b8f67
|
Subproject commit a342bfd08d0caf66611addb292da53164a4f7fa4
|
Loading…
Reference in New Issue
Block a user