mirror of
https://github.com/bigbluebutton/docker.git
synced 2025-01-23 14:08:35 +01:00
initial commit
This commit is contained in:
parent
d636a3f92c
commit
15709ccca0
59
Dockerfile
Normal file
59
Dockerfile
Normal file
@ -0,0 +1,59 @@
|
||||
FROM ubuntu:16.04
|
||||
MAINTAINER ffdixon@bigbluebutton.org
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
RUN echo 'Acquire::http::Proxy "http://192.168.0.130:3142";' > /etc/apt/apt.conf.d/01proxy
|
||||
RUN apt-get update && apt-get install -y wget
|
||||
|
||||
RUN echo "deb http://ubuntu.bigbluebutton.org/xenial-200 bigbluebutton-xenial main " | tee /etc/apt/sources.list.d/bigbluebutton.list
|
||||
RUN wget http://ubuntu.bigbluebutton.org/repo/bigbluebutton.asc -O- | apt-key add -
|
||||
RUN apt-get update && apt-get -y dist-upgrade
|
||||
|
||||
# -- Setup tomcat7 to run under docker
|
||||
RUN apt-get install -y \
|
||||
haveged \
|
||||
net-tools \
|
||||
supervisor \
|
||||
sudo \
|
||||
tomcat7
|
||||
|
||||
RUN sed -i 's|securerandom.source=file:/dev/random|securerandom.source=file:/dev/urandom|g' /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security
|
||||
ADD mod/tomcat7 /etc/init.d/tomcat7
|
||||
RUN chmod +x /etc/init.d/tomcat7
|
||||
|
||||
RUN apt-get install -y language-pack-en
|
||||
RUN update-locale LANG=en_US.UTF-8
|
||||
|
||||
# -- Install BigBlueButton
|
||||
RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
|
||||
RUN apt-get install -y bigbluebutton
|
||||
RUN apt-get install -y bbb-demo
|
||||
|
||||
# -- Install mongodb (for HTML5 client)
|
||||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
|
||||
RUN echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
|
||||
RUN sudo apt-get update && sudo apt-get install -y mongodb-org curl
|
||||
|
||||
# -- Install nodejs (for HTML5 client)
|
||||
RUN apt-get install -y apt-transport-https
|
||||
RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
|
||||
RUN echo 'deb http://deb.nodesource.com/node_6.x xenial main' > /etc/apt/sources.list.d/nodesource.list
|
||||
RUN echo 'deb-src http://deb.nodesource.com/node_6.x xenial main' >> /etc/apt/sources.list.d/nodesource.list
|
||||
RUN apt-get update && apt-get install -y nodejs
|
||||
|
||||
# -- Install HTML5 client
|
||||
RUN apt-get install -y bbb-html5
|
||||
|
||||
# -- Install supervisor to run all the BigBlueButton processes (replaces systemd)
|
||||
RUN apt-get install -y supervisor
|
||||
RUN mkdir -p /var/log/supervisor
|
||||
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
# -- Modify FreeSWITCH event_socket.conf.xml to listen to IPV4
|
||||
ADD mod/event_socket.conf.xml /opt/freeswitch/etc/freeswitch/autoload_configs
|
||||
|
||||
# -- Finish startup
|
||||
ADD setup.sh /root/setup.sh
|
||||
ENTRYPOINT ["/root/setup.sh"]
|
||||
CMD []
|
||||
|
@ -1,2 +1,5 @@
|
||||
# docker
|
||||
Docker files for BigBluebutton
|
||||
# Overview
|
||||
|
||||
These are scripts to run BigBlueButton within Docker.
|
||||
|
||||
See [setup instructions](http://docs.bigbluebutton.org/docker.html).
|
||||
|
11
mod/event_socket.conf.xml
Normal file
11
mod/event_socket.conf.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<configuration name="event_socket.conf" description="Socket Client">
|
||||
<settings>
|
||||
<param name="nat-map" value="false"/>
|
||||
<param name="listen-ip" value="127.0.0.1"/>
|
||||
<param name="listen-port" value="8021"/>
|
||||
<param name="password" value="ClueCon"/>
|
||||
<!--<param name="apply-inbound-acl" value="loopback.auto"/>-->
|
||||
<!--<param name="stop-on-bind-error" value="true"/>-->
|
||||
</settings>
|
||||
</configuration>
|
||||
|
287
mod/tomcat7
Executable file
287
mod/tomcat7
Executable file
@ -0,0 +1,287 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# /etc/init.d/tomcat7 -- startup script for the Tomcat 6 servlet engine
|
||||
#
|
||||
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
|
||||
# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
|
||||
# Modified for Tomcat by Stefan Gybas <sgybas@debian.org>.
|
||||
# Modified for Tomcat6 by Thierry Carrez <thierry.carrez@ubuntu.com>.
|
||||
# Modified for Tomcat7 by Ernesto Hernandez-Novich <emhn@itverx.com.ve>.
|
||||
# Additional improvements by Jason Brittain <jason.brittain@mulesoft.com>.
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: tomcat7
|
||||
# Required-Start: $local_fs $remote_fs $network
|
||||
# Required-Stop: $local_fs $remote_fs $network
|
||||
# Should-Start: $named
|
||||
# Should-Stop: $named
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Start Tomcat.
|
||||
# Description: Start the Tomcat servlet engine.
|
||||
### END INIT INFO
|
||||
|
||||
set -e
|
||||
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
NAME=tomcat7
|
||||
DESC="Tomcat servlet engine"
|
||||
DEFAULT=/etc/default/$NAME
|
||||
JVM_TMP=/tmp/tomcat7-$NAME-tmp
|
||||
|
||||
if [ `id -u` -ne 0 ]; then
|
||||
echo "You need root privileges to run this script"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure tomcat is started with system locale
|
||||
if [ -r /etc/default/locale ]; then
|
||||
. /etc/default/locale
|
||||
export LANG
|
||||
fi
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
if [ -r /etc/default/rcS ]; then
|
||||
. /etc/default/rcS
|
||||
fi
|
||||
|
||||
|
||||
# The following variables can be overwritten in $DEFAULT
|
||||
|
||||
# Run Tomcat 7 as this user ID and group ID
|
||||
TOMCAT7_USER=tomcat7
|
||||
TOMCAT7_GROUP=tomcat7
|
||||
|
||||
# this is a work-around until there is a suitable runtime replacement
|
||||
# for dpkg-architecture for arch:all packages
|
||||
# this function sets the variable JDK_DIRS
|
||||
find_jdks()
|
||||
{
|
||||
for java_version in 9 8 7 6
|
||||
do
|
||||
for jvmdir in /usr/lib/jvm/java-${java_version}-openjdk-* \
|
||||
/usr/lib/jvm/jdk-${java_version}-oracle-* \
|
||||
/usr/lib/jvm/jre-${java_version}-oracle-*
|
||||
do
|
||||
if [ -d "${jvmdir}" -a "${jvmdir}" != "/usr/lib/jvm/java-${java_version}-openjdk-common" ]
|
||||
then
|
||||
JDK_DIRS="${JDK_DIRS} ${jvmdir}"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# Add older non multi arch installations
|
||||
JDK_DIRS="${JDK_DIRS} /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-7-oracle"
|
||||
}
|
||||
|
||||
# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
|
||||
# defined in $DEFAULT)
|
||||
JDK_DIRS="/usr/lib/jvm/default-java"
|
||||
find_jdks
|
||||
|
||||
# Look for the right JVM to use
|
||||
for jdir in $JDK_DIRS; do
|
||||
if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
|
||||
JAVA_HOME="$jdir"
|
||||
fi
|
||||
done
|
||||
export JAVA_HOME
|
||||
|
||||
# Directory where the Tomcat 6 binary distribution resides
|
||||
CATALINA_HOME=/usr/share/$NAME
|
||||
|
||||
# Directory for per-instance configuration files and webapps
|
||||
CATALINA_BASE=/var/lib/$NAME
|
||||
|
||||
# Use the Java security manager? (yes/no)
|
||||
TOMCAT7_SECURITY=no
|
||||
|
||||
# Default Java options
|
||||
# Set java.awt.headless=true if JAVA_OPTS is not set so the
|
||||
# Xalan XSL transformer can work without X11 display on JDK 1.4+
|
||||
# It also looks like the default heap size of 64M is not enough for most cases
|
||||
# so the maximum heap size is set to 128M
|
||||
if [ -z "$JAVA_OPTS" ]; then
|
||||
JAVA_OPTS="-Djava.awt.headless=true -Xmx128M"
|
||||
fi
|
||||
|
||||
# End of variables that can be overwritten in $DEFAULT
|
||||
|
||||
# overwrite settings from default file
|
||||
if [ -f "$DEFAULT" ]; then
|
||||
. "$DEFAULT"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CATALINA_HOME/bin/bootstrap.jar" ]; then
|
||||
log_failure_msg "$NAME is not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
POLICY_CACHE="$CATALINA_BASE/work/catalina.policy"
|
||||
|
||||
if [ -z "$CATALINA_TMPDIR" ]; then
|
||||
CATALINA_TMPDIR="$JVM_TMP"
|
||||
fi
|
||||
|
||||
# Set the JSP compiler if set in the tomcat7.default file
|
||||
if [ -n "$JSP_COMPILER" ]; then
|
||||
JAVA_OPTS="$JAVA_OPTS -Dbuild.compiler=\"$JSP_COMPILER\""
|
||||
fi
|
||||
JAVA_OPTS="$JAVA_OPTS -Djava.security.egd=file:/dev/./urandom"
|
||||
|
||||
SECURITY=""
|
||||
if [ "$TOMCAT7_SECURITY" = "yes" ]; then
|
||||
SECURITY="-security"
|
||||
fi
|
||||
|
||||
# Define other required variables
|
||||
CATALINA_PID="/var/run/$NAME.pid"
|
||||
CATALINA_SH="$CATALINA_HOME/bin/catalina.sh"
|
||||
|
||||
# Look for Java Secure Sockets Extension (JSSE) JARs
|
||||
if [ -z "${JSSE_HOME}" -a -r "${JAVA_HOME}/jre/lib/jsse.jar" ]; then
|
||||
JSSE_HOME="${JAVA_HOME}/jre/"
|
||||
fi
|
||||
|
||||
catalina_sh() {
|
||||
# Escape any double quotes in the value of JAVA_OPTS
|
||||
JAVA_OPTS="$(echo $JAVA_OPTS | sed 's/\"/\\\"/g')"
|
||||
|
||||
AUTHBIND_COMMAND=""
|
||||
if [ "$AUTHBIND" = "yes" -a "$1" = "start" ]; then
|
||||
AUTHBIND_COMMAND="/usr/bin/authbind --deep /bin/bash -c "
|
||||
fi
|
||||
|
||||
# Define the command to run Tomcat's catalina.sh as a daemon
|
||||
# set -a tells sh to export assigned variables to spawned shells.
|
||||
TOMCAT_SH="set -a; JAVA_HOME=\"$JAVA_HOME\"; source \"$DEFAULT\"; \
|
||||
CATALINA_HOME=\"$CATALINA_HOME\"; \
|
||||
CATALINA_BASE=\"$CATALINA_BASE\"; \
|
||||
JAVA_OPTS=\"$JAVA_OPTS\"; \
|
||||
CATALINA_PID=\"$CATALINA_PID\"; \
|
||||
CATALINA_TMPDIR=\"$CATALINA_TMPDIR\"; \
|
||||
LANG=\"$LANG\"; JSSE_HOME=\"$JSSE_HOME\"; \
|
||||
cd \"$CATALINA_BASE\"; \
|
||||
\"$CATALINA_SH\" $@"
|
||||
|
||||
if [ "$AUTHBIND" = "yes" -a "$1" = "start" ]; then
|
||||
TOMCAT_SH="'$TOMCAT_SH'"
|
||||
fi
|
||||
|
||||
# Run the catalina.sh script as a daemon
|
||||
set +e
|
||||
touch "$CATALINA_PID" "$CATALINA_BASE"/logs/catalina.out
|
||||
chown $TOMCAT7_USER "$CATALINA_PID" "$CATALINA_BASE"/logs/catalina.out
|
||||
start-stop-daemon --start -b -u "$TOMCAT7_USER" -g "$TOMCAT7_GROUP" \
|
||||
-c "$TOMCAT7_USER" -d "$CATALINA_TMPDIR" -p "$CATALINA_PID" \
|
||||
-x /bin/bash -- -c "$AUTHBIND_COMMAND $TOMCAT_SH"
|
||||
status="$?"
|
||||
set +a -e
|
||||
return $status
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
log_failure_msg "no JDK or JRE found - please set JAVA_HOME"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$CATALINA_BASE/conf" ]; then
|
||||
log_failure_msg "invalid CATALINA_BASE: $CATALINA_BASE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log_daemon_msg "Starting $DESC" "$NAME"
|
||||
if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
|
||||
--user $TOMCAT7_USER --exec "$JAVA_HOME/bin/java" \
|
||||
>/dev/null; then
|
||||
|
||||
# Regenerate POLICY_CACHE file
|
||||
umask 022
|
||||
echo "// AUTO-GENERATED FILE from /etc/tomcat7/policy.d/" \
|
||||
> "$POLICY_CACHE"
|
||||
echo "" >> "$POLICY_CACHE"
|
||||
cat $CATALINA_BASE/conf/policy.d/*.policy \
|
||||
>> "$POLICY_CACHE"
|
||||
|
||||
# Remove / recreate JVM_TMP directory
|
||||
rm -rf "$JVM_TMP"
|
||||
mkdir -p "$JVM_TMP" || {
|
||||
log_failure_msg "could not create JVM temporary directory"
|
||||
exit 1
|
||||
}
|
||||
chown $TOMCAT7_USER "$JVM_TMP"
|
||||
|
||||
catalina_sh start $SECURITY
|
||||
sleep 5
|
||||
log_end_msg 0
|
||||
else
|
||||
log_progress_msg "(already running)"
|
||||
log_end_msg 0
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
|
||||
set +e
|
||||
if [ -f "$CATALINA_PID" ]; then
|
||||
start-stop-daemon --stop --pidfile "$CATALINA_PID" \
|
||||
--user "$TOMCAT7_USER" \
|
||||
--retry=TERM/20/KILL/5 >/dev/null
|
||||
if [ $? -eq 1 ]; then
|
||||
log_progress_msg "$DESC is not running but pid file exists, cleaning up"
|
||||
elif [ $? -eq 3 ]; then
|
||||
PID="`cat $CATALINA_PID`"
|
||||
log_failure_msg "Failed to stop $NAME (pid $PID)"
|
||||
exit 1
|
||||
fi
|
||||
rm -f "$CATALINA_PID"
|
||||
rm -rf "$JVM_TMP"
|
||||
else
|
||||
log_progress_msg "(not running)"
|
||||
fi
|
||||
log_end_msg 0
|
||||
set -e
|
||||
;;
|
||||
status)
|
||||
set +e
|
||||
start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
|
||||
--user $TOMCAT7_USER --exec "$JAVA_HOME/bin/java" \
|
||||
>/dev/null 2>&1
|
||||
if [ "$?" = "0" ]; then
|
||||
|
||||
if [ -f "$CATALINA_PID" ]; then
|
||||
log_success_msg "$DESC is not running, but pid file exists."
|
||||
exit 1
|
||||
else
|
||||
log_success_msg "$DESC is not running."
|
||||
exit 3
|
||||
fi
|
||||
else
|
||||
log_success_msg "$DESC is running with pid `cat $CATALINA_PID`"
|
||||
fi
|
||||
set -e
|
||||
;;
|
||||
restart|force-reload)
|
||||
if [ -f "$CATALINA_PID" ]; then
|
||||
$0 stop
|
||||
sleep 1
|
||||
fi
|
||||
$0 start
|
||||
;;
|
||||
try-restart)
|
||||
if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
|
||||
--user $TOMCAT7_USER --exec "$JAVA_HOME/bin/java" \
|
||||
>/dev/null; then
|
||||
$0 start
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
log_success_msg "Usage: $0 {start|stop|restart|try-restart|force-reload|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
125
setup.sh
Executable file
125
setup.sh
Executable file
@ -0,0 +1,125 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
|
||||
change_var_value () {
|
||||
sed -i "s<^[[:blank:]#]*\(${2}\).*<\1=${3}<" $1
|
||||
}
|
||||
|
||||
# docker build -t ffdixon/play_win .
|
||||
# docker run -p 80:80/tcp -p 443:443/tcp -p 1935:1935/tcp -p 5066:5066/tcp -p 2202:2202 -p 32750-32768:32750-32768/udp --cap-add=NET_ADMIN ffdixon/play_win -h 192.168.0.130
|
||||
# docker run -p 80:80/tcp -p 443:443/tcp -p 1935:1935/tcp -p 5066:5066/tcp -p 2202:2202 -p 32750-32768:32750-32768/udp --cap-add=NET_ADMIN ffdixon/play_win -h 192.168.10.186
|
||||
|
||||
while getopts "eh:" opt; do
|
||||
case $opt in
|
||||
e)
|
||||
env
|
||||
exit
|
||||
;;
|
||||
h)
|
||||
HOST=$OPTARG
|
||||
;;
|
||||
e)
|
||||
SECRET=$OPTARG
|
||||
;;
|
||||
:)
|
||||
echo "Missing option argument for -$OPTARG" >&2;
|
||||
exit 1
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
cat<<HERE
|
||||
Docker startup script for BigBlueButton.
|
||||
|
||||
-h Hostname for BigBlueButton server
|
||||
-s Shared secret
|
||||
|
||||
HERE
|
||||
exit 1
|
||||
;;
|
||||
:)
|
||||
echo "Option -$OPTARG requires an argument." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
apt-get install -y bbb-demo && /etc/init.d/tomcat7 start
|
||||
while [ ! -f /var/lib/tomcat7/webapps/demo/bbb_api_conf.jsp ]; do sleep 1; done
|
||||
sudo /etc/init.d/tomcat7 stop
|
||||
|
||||
|
||||
# Setup loopback address so FreeSWITCH can bind WS-BIND-URL to host IP
|
||||
#
|
||||
sudo ip addr add $HOST dev lo
|
||||
|
||||
# Setup the BigBlueButton configuration files
|
||||
#
|
||||
PROTOCOL_HTTP=http
|
||||
PROTOCOL_RTMP=rtmp
|
||||
IP=$(echo "$(LANG=c ifconfig | awk -v RS="" '{gsub (/\n[ ]*inet /," ")}1' | grep ^et.* | grep addr: | head -n1 | sed 's/.*addr://g' | sed 's/ .*//g')$(LANG=c ifconfig | awk -v RS="" '{gsub (/\n[ ]*inet /," ")}1' | grep ^en.* | grep addr: | head -n1 | sed 's/.*addr://g' | sed 's/ .*//g')" | head -n1)
|
||||
|
||||
sed -i 's/<!-- <param name="rtp-start-port" value="16384"\/> -->/<param name="rtp-start-port" value="32750"\/>/g' /opt/freeswitch/etc/freeswitch/autoload_configs/switch.conf.xml
|
||||
sed -i 's/<!-- <param name="rtp-end-port" value="32768"\/> -->/<param name="rtp-end-port" value="32768"\/>/g' /opt/freeswitch/etc/freeswitch/autoload_configs/switch.conf.xml
|
||||
|
||||
sed -i "s/stun:stun.freeswitch.org/$HOST/g" /opt/freeswitch/etc/freeswitch/vars.xml
|
||||
sed -i "s/<X-PRE-PROCESS cmd=\"set\" data=\"local_ip_v4=.*//g" /opt/freeswitch/etc/freeswitch/vars.xml
|
||||
|
||||
sed -i "s/ext-rtp-ip\" value=\"\$\${local_ip_v4/ext-rtp-ip\" value=\"\$\${external_rtp_ip/g" /opt/freeswitch/conf/sip_profiles/external.xml
|
||||
sed -i "s/ext-sip-ip\" value=\"\$\${local_ip_v4/ext-sip-ip\" value=\"\$\${external_sip_ip/g" /opt/freeswitch/conf/sip_profiles/external.xml
|
||||
sed -i "s/<param name=\"ws-binding\".*/<param name=\"ws-binding\" value=\"$HOST:5066\"\/>/g" /opt/freeswitch/conf/sip_profiles/external.xml
|
||||
|
||||
sed -i "s/proxy_pass .*/proxy_pass $PROTOCOL_HTTP:\/\/$HOST:5066;/g" /etc/bigbluebutton/nginx/sip.nginx
|
||||
|
||||
sed -i "s/porttest host=\(\"[^\"]*\"\)/porttest host=\"$HOST\"/g" /var/www/bigbluebutton/client/conf/config.xml
|
||||
sed -i "s/publishURI=\"[^\"]*\"/publishURI=\"$HOST\"/" /var/www/bigbluebutton/client/conf/config.xml
|
||||
sed -i "s/http[s]*:\/\/\([^\"\/]*\)\([\"\/]\)/$PROTOCOL_HTTP:\/\/$HOST\2/g" /var/www/bigbluebutton/client/conf/config.xml
|
||||
sed -i "s/rtmp[s]*:\/\/\([^\"\/]*\)\([\"\/]\)/$PROTOCOL_RTMP:\/\/$HOST\2/g" /var/www/bigbluebutton/client/conf/config.xml
|
||||
|
||||
sed -i "s/server_name .*/server_name $HOST;/g" /etc/nginx/sites-available/bigbluebutton
|
||||
|
||||
sed -i "s/bigbluebutton.web.serverURL=http[s]*:\/\/.*/bigbluebutton.web.serverURL=$PROTOCOL_HTTP:\/\/$HOST/g" \
|
||||
/var/lib/tomcat7/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties
|
||||
|
||||
change_var_value /usr/share/red5/webapps/screenshare/WEB-INF/screenshare.properties streamBaseUrl rtmp://$HOST/screenshare
|
||||
change_var_value /usr/share/red5/webapps/screenshare/WEB-INF/screenshare.properties jnlpUrl $PROTOCOL_HTTP://$HOST/screenshare
|
||||
change_var_value /usr/share/red5/webapps/screenshare/WEB-INF/screenshare.properties jnlpFile $PROTOCOL_HTTP://$HOST/screenshare/screenshare.jnlp
|
||||
|
||||
change_var_value /usr/share/red5/webapps/sip/WEB-INF/bigbluebutton-sip.properties bbb.sip.app.ip $IP
|
||||
change_var_value /usr/share/red5/webapps/sip/WEB-INF/bigbluebutton-sip.properties freeswitch.ip $IP
|
||||
|
||||
sed -i "s/bbbWebAPI[ ]*=[ ]*\"[^\"]*\"/bbbWebAPI=\"${PROTOCOL_HTTP}:\/\/$HOST\/bigbluebutton\/api\"/g" \
|
||||
/usr/share/bbb-apps-akka/conf/application.conf
|
||||
sed -i "s/bbbWebHost[ ]*=[ ]*\"[^\"]*\"/bbbWebHost=\"$HOST\"/g" \
|
||||
/usr/share/bbb-apps-akka/conf/application.conf
|
||||
sed -i "s/deskshareip[ ]*=[ ]*\"[^\"]*\"/deskshareip=\"$HOST\"/g" \
|
||||
/usr/share/bbb-apps-akka/conf/application.conf
|
||||
sed -i "s/defaultPresentationURL[ ]*=[ ]*\"[^\"]*\"/defaultPresentationURL=\"${PROTOCOL_HTTP}:\/\/$HOST\/default.pdf\"/g" \
|
||||
/usr/share/bbb-apps-akka/conf/application.conf
|
||||
|
||||
# Fix to ensure application.conf has the latest shared secret
|
||||
SECRET=$(cat /var/lib/tomcat7/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties | grep -v '#' | grep securitySalt | cut -d= -f2);
|
||||
sed -i "s/sharedSecret[ ]*=[ ]*\"[^\"]*\"/sharedSecret=\"$SECRET\"/g" \
|
||||
/usr/share/bbb-apps-akka/conf/application.conf
|
||||
|
||||
sed -i "s/BigBlueButtonURL = \"http[s]*:\/\/\([^\"\/]*\)\([\"\/]\)/BigBlueButtonURL = \"$PROTOCOL_HTTP:\/\/$HOST\2/g" \
|
||||
/var/lib/tomcat7/webapps/demo/bbb_api_conf.jsp
|
||||
|
||||
sed -i "s/playback_host: .*/playback_host: $HOST/g" /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml
|
||||
|
||||
sed -i 's/daemonize no/daemonize yes/g' /etc/redis/redis.conf
|
||||
|
||||
rm /usr/share/red5/log/sip.log
|
||||
|
||||
# Add a sleep to each recording process so we can restart with supervisord
|
||||
sed -i 's/BigBlueButton.logger.debug("rap-archive-worker done")/sleep 20; BigBlueButton.logger.debug("rap-archive-worker done")/g' /usr/local/bigbluebutton/core/scripts/rap-archive-worker.rb
|
||||
|
||||
sed -i 's/BigBlueButton.logger.debug("rap-process-worker done")/sleep 20; BigBlueButton.logger.debug("rap-process-worker done")/g' /usr/local/bigbluebutton/core/scripts/rap-process-worker.rb
|
||||
|
||||
sed -i 's/BigBlueButton.logger.debug("rap-sanity-worker done")/sleep 20; BigBlueButton.logger.debug("rap-sanity-worker done")/g' /usr/local/bigbluebutton/core/scripts/rap-sanity-worker.rb
|
||||
|
||||
sed -i 's/BigBlueButton.logger.debug("rap-publish-worker done")/sleep 20; BigBlueButton.logger.debug("rap-publish-worker done")/g' /usr/local/bigbluebutton/core/scripts/rap-publish-worker.rb
|
||||
|
||||
# Start BigBlueButton!
|
||||
#
|
||||
/usr/bin/supervisord
|
||||
|
91
supervisord.conf
Normal file
91
supervisord.conf
Normal file
@ -0,0 +1,91 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///var/run/supervisor.sock
|
||||
|
||||
[program:redis-server]
|
||||
startsecs = 0
|
||||
autorestart = false
|
||||
#user=redis
|
||||
command=/usr/bin/redis-server /etc/redis/redis.conf
|
||||
stdout_logfile=/var/log/redis/stdout.log
|
||||
stderr_logfile=/var/log/redis/stderr.log
|
||||
|
||||
[program:nginx]
|
||||
startsecs = 0
|
||||
autorestart = false
|
||||
command=/usr/sbin/nginx -g "daemon off;"
|
||||
|
||||
[program:freeswitch]
|
||||
startsecs = 0
|
||||
autorestart = false
|
||||
user=freeswitch
|
||||
group=daemon
|
||||
directory=/opt/freeswitch
|
||||
command=/opt/freeswitch/bin/freeswitch -nc -nf -core -nonat
|
||||
|
||||
[program:bbb-apps-akka]
|
||||
startsecs = 0
|
||||
autorestart = false
|
||||
user=bigbluebutton
|
||||
directory=/usr/share/bbb-apps-akka
|
||||
command=/usr/share/bbb-apps-akka/bin/bbb-apps-akka
|
||||
|
||||
[program:bbb-fsesl-akka]
|
||||
startsecs = 0
|
||||
autorestart = false
|
||||
user=bigbluebutton
|
||||
directory=/usr/share/bbb-fsesl-akka
|
||||
command=/usr/share/bbb-fsesl-akka/bin/bbb-fsesl-akka
|
||||
|
||||
[program:red5]
|
||||
startsecs = 0
|
||||
autorestart = false
|
||||
user=red5
|
||||
directory=/usr/share/red5
|
||||
command=/usr/share/red5/red5.sh
|
||||
|
||||
[program:rap-archive-worker]
|
||||
command=/usr/local/bigbluebutton/core/scripts/rap-archive-worker.rb
|
||||
directory=/usr/local/bigbluebutton/core/scripts
|
||||
user=tomcat7
|
||||
autorestart=true
|
||||
|
||||
[program:rap-process-worker]
|
||||
command=/usr/local/bigbluebutton/core/scripts/rap-process-worker.rb
|
||||
directory=/usr/local/bigbluebutton/core/scripts
|
||||
user=tomcat7
|
||||
autorestart=true
|
||||
|
||||
[program:rap-sanity-worker]
|
||||
command=/usr/local/bigbluebutton/core/scripts/rap-sanity-worker.rb
|
||||
directory=/usr/local/bigbluebutton/core/scripts
|
||||
user=tomcat7
|
||||
autorestart=true
|
||||
|
||||
[program:rap-publish-worker]
|
||||
command=/usr/local/bigbluebutton/core/scripts/rap-publish-worker.rb
|
||||
directory=/usr/local/bigbluebutton/core/scripts
|
||||
user=tomcat7
|
||||
autorestart=true
|
||||
|
||||
[program:mongod]
|
||||
command=/usr/bin/mongod --quiet --config /etc/mongod.conf
|
||||
stdout_logfile=/var/log/supervisor/%(program_name)s.log
|
||||
stderr_logfile=/var/log/supervisor/%(program_name)s.log
|
||||
user=mongodb
|
||||
autorestart=true
|
||||
|
||||
[program:bbb-html5]
|
||||
command=/usr/share/meteor/bundle/systemd_start.sh
|
||||
directory=/usr/share/meteor/bundle
|
||||
user=meteor
|
||||
group=meteor
|
||||
autorestart=true
|
||||
|
||||
[program:tomcat7]
|
||||
startsecs = 0
|
||||
autorestart = false
|
||||
user=tomcat7
|
||||
command=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/bin/java -Djava.util.logging.config.file=/var/lib/tomcat7/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC -Xms256m -Xmx256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/bigbluebutton/diagnostics -Djava.endorsed.dirs=/usr/share/tomcat7/endorsed -classpath /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar -Dcatalina.base=/var/lib/tomcat7 -Dcatalina.home=/usr/share/tomcat7 -Djava.io.tmpdir=/tmp/tomcat7-tomcat7-tmp org.apache.catalina.startup.Bootstrap start
|
Loading…
Reference in New Issue
Block a user