forked from extern/docker
dockerize templates for core, cleanup Dockerfile
This commit is contained in:
parent
e2901ddd81
commit
656a9b8812
@ -1,27 +1,30 @@
|
||||
version: '3.6'
|
||||
|
||||
services:
|
||||
base:
|
||||
image: bbb-base
|
||||
hostname: meet.livingutopia.org
|
||||
core:
|
||||
image: bbb-core
|
||||
cap_add:
|
||||
- SYS_NICE # for realtime scheduling
|
||||
- SYS_ADMIN # for systemd
|
||||
environment:
|
||||
- container=docker
|
||||
DOMAIN: ${DOMAIN}
|
||||
EXTERNAL_IP: ${EXTERNAL_IP}
|
||||
SHARED_SECRET: ${SHARED_SECRET}
|
||||
WELCOME_MESSAGE: ${WELCOME_MESSAGE}
|
||||
WELCOME_FOOTER: ${WELCOME_FOOTER}
|
||||
container: docker
|
||||
tmpfs:
|
||||
- /run
|
||||
- /run/lock
|
||||
- /tmp:exec,mode=777
|
||||
volumes:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro # for systemd
|
||||
- ./mod/base/setup.sh:/opt/setup.sh
|
||||
- ./mod/freeswitch/vars.xml:/opt/freeswitch/conf/vars.xml
|
||||
- ./mod/core/entrypoint.sh:/entrypoint.sh
|
||||
- ./mod/freeswitch/vars.xml:/opt/freeswitch/conf/vars.xml.tmpl
|
||||
- ./mod/freeswitch/external.xml:/opt/freeswitch/conf/sip_profiles/external.xml
|
||||
- ./mod/web/override.conf:/etc/systemd/system/bbb-web.service.d/override.conf
|
||||
- ./mod/web/bigbluebutton.properties:/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
|
||||
- ./mod/base/bigbluebutton.yml:/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml
|
||||
- ./mod/bbb-apps-akka/application.conf:/usr/share/bbb-apps-akka/conf/application.conf
|
||||
- ./mod/web/bigbluebutton.properties:/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties.tmpl
|
||||
- ./mod/core/bigbluebutton.yml:/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml
|
||||
- ./mod/bbb-apps-akka/application.conf:/usr/share/bbb-apps-akka/conf/application.conf.tmpl
|
||||
network_mode: host
|
||||
|
||||
nginx:
|
||||
@ -84,7 +87,7 @@ services:
|
||||
depends_on:
|
||||
- redis
|
||||
- kurento
|
||||
- base
|
||||
- core
|
||||
environment:
|
||||
CLIENT_HOST: 0.0.0.0
|
||||
KURENTO_NAME: kurento
|
||||
|
@ -1,67 +0,0 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
|
||||
HOST=meet.livingutopia.org
|
||||
TOMCAT_USER=tomcat7
|
||||
SERVLET_DIR=/usr/share/bbb-web
|
||||
|
||||
TURN_XML=$SERVLET_DIR/WEB-INF/classes/spring/turn-stun-servers.xml
|
||||
|
||||
while [ ! -f $SERVLET_DIR/WEB-INF/classes/bigbluebutton.properties ]; do sleep 1; echo -n '.'; done
|
||||
|
||||
# delete IPv6 sip profiles
|
||||
rm -rf /opt/freeswitch/conf/sip_profiles/*-ipv6*
|
||||
|
||||
|
||||
if [ -f /var/www/bigbluebutton/client/conf/config.xml ]; then
|
||||
sed -i 's/offerWebRTC="false"/offerWebRTC="true"/g' /var/www/bigbluebutton/client/conf/config.xml
|
||||
fi
|
||||
|
||||
# while [ ! -f /var/lib/$TOMCAT_USER/webapps/demo/bbb_api_conf.jsp ]; do sleep 1; echo -n '.'; done
|
||||
|
||||
|
||||
if [ -f /var/www/bigbluebutton/client/conf/config.xml ]; then
|
||||
sed -i 's/tryWebRTCFirst="false"/tryWebRTCFirst="true"/g' /var/www/bigbluebutton/client/conf/config.xml
|
||||
fi
|
||||
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
|
||||
if [ -f /var/www/bigbluebutton/client/conf/config.xml ]; then
|
||||
sed -i 's|http://|https://|g' /var/www/bigbluebutton/client/conf/config.xml
|
||||
sed -i 's/jnlpUrl=http/jnlpUrl=https/g' /usr/share/red5/webapps/screenshare/WEB-INF/screenshare.properties
|
||||
sed -i 's/jnlpFile=http/jnlpFile=https/g' /usr/share/red5/webapps/screenshare/WEB-INF/screenshare.properties
|
||||
fi
|
||||
|
||||
yq w -i /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml playback_protocol https
|
||||
chmod 644 /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml
|
||||
|
||||
# if [ -f /var/lib/$TOMCAT_USER/webapps/demo/bbb_api_conf.jsp ]; then
|
||||
# sed -i 's|String BigBlueButtonURL = ".*|String BigBlueButtonURL = "http://127.0.0.1:8090/bigbluebutton/";|g' /var/lib/$TOMCAT_USER/webapps/demo/bbb_api_conf.jsp
|
||||
# fi
|
||||
|
||||
# Update HTML5 client (if installed) to use SSL
|
||||
if [ -f /usr/share/meteor/bundle/programs/server/assets/app/config/settings.json ]; then
|
||||
sed -i "s|\"wsUrl.*|\"wsUrl\": \"wss://$HOST/bbb-webrtc-sfu\",|g" \
|
||||
/usr/share/meteor/bundle/programs/server/assets/app/config/settings.json
|
||||
fi
|
||||
|
||||
bbb-conf --setip $HOST
|
||||
# Assigning meet.livingutopia.org for testing for firewall in /var/www/bigbluebutton/client/conf/config.xml
|
||||
# Assigning meet.livingutopia.org for rtmp:// in /var/www/bigbluebutton/client/conf/config.xml
|
||||
# Assigning meet.livingutopia.org for servername in /etc/nginx/sites-available/bigbluebutton
|
||||
# Assigning meet.livingutopia.org for http[s]:// in /var/www/bigbluebutton/client/conf/config.xml
|
||||
# Assigning meet.livingutopia.org for publishURI in /var/www/bigbluebutton/client/conf/config.xml
|
||||
# Assigning meet.livingutopia.org for web application URL in /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
|
||||
# sed: cannot rename /usr/share/bbb-web/WEB-INF/classes/sed3ZgbUO: Device or resource busy
|
||||
# sed: cannot rename /usr/share/bbb-web/WEB-INF/classes/sednkGxuN: Device or resource busy
|
||||
# Assigning meet.livingutopia.org for web application URL in /usr/share/bbb-apps-akka/conf/application.conf
|
||||
# Assigning meet.livingutopia.org for api demos in /var/lib/tomcat7/webapps/demo/bbb_api_conf.jsp
|
||||
# Assigning meet.livingutopia.org for record and playback in /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml
|
||||
# Assigning meet.livingutopia.org for playback of recordings:
|
||||
|
||||
# Disable auto start
|
||||
find /etc/systemd/ | grep wants | xargs -r -n 1 basename | grep service | grep -v networking | grep -v tty | xargs -r -n 1 -I __ systemctl disable __
|
||||
systemctl disable tomcat7
|
||||
|
||||
# Update files
|
||||
updatedb
|
287
mod/base/tomcat7
287
mod/base/tomcat7
@ -1,287 +0,0 @@
|
||||
#!/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
|
@ -1,31 +1,42 @@
|
||||
FROM ubuntu:16.04
|
||||
MAINTAINER ffdixon@bigbluebutton.org
|
||||
|
||||
# TODO:
|
||||
# - separate bbb-apps into an own container
|
||||
# - separate bbb-web
|
||||
# - remove systemd
|
||||
# - checkfor removeable dependencies and dummy services
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV container docker
|
||||
ENV DOCKERIZE_VERSION v0.6.1
|
||||
|
||||
# just to speed up development, TODO: remove
|
||||
COPY sources.list /etc/apt/sources.list
|
||||
|
||||
RUN apt-get update && apt-get install -y software-properties-common language-pack-en
|
||||
|
||||
RUN apt-get update && apt-get install -y software-properties-common language-pack-en wget
|
||||
RUN update-locale LANG=en_US.UTF-8
|
||||
RUN LC_CTYPE=C.UTF-8 add-apt-repository ppa:rmescandon/yq
|
||||
RUN apt-get install -y --no-install-recommends apt-utils
|
||||
RUN apt-get -y -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" install grub-pc update-notifier-common
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y systemd
|
||||
RUN apt-get update
|
||||
|
||||
# install dockerize
|
||||
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
|
||||
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
|
||||
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
|
||||
|
||||
# install dev helpers
|
||||
RUN apt-get install -y tcpdump telnet htop vim
|
||||
|
||||
# -- Install Dependencies
|
||||
RUN apt-get install -y wget apt-transport-https curl mlocate strace iputils-ping telnet tcpdump vim htop \
|
||||
tidy libreoffice sudo netcat-openbsd net-tools openjdk-8-jre perl build-essential \
|
||||
ruby rake unzip xmlstarlet rsync tomcat7 yq equivs
|
||||
|
||||
RUN apt-get install -y systemd apt-transport-https equivs libreoffice
|
||||
|
||||
# bbb repo & packages
|
||||
RUN LC_CTYPE=C.UTF-8 add-apt-repository ppa:bigbluebutton/support
|
||||
RUN sh -c 'wget https://ubuntu.bigbluebutton.org/repo/bigbluebutton.asc -O- | apt-key add -' \
|
||||
&& sh -c 'echo "deb https://ubuntu.bigbluebutton.org/xenial-220 bigbluebutton-xenial main" > /etc/apt/sources.list.d/bigbluebutton.list'
|
||||
&& sh -c 'echo "deb https://ubuntu.bigbluebutton.org/xenial-220 bigbluebutton-xenial main" > /etc/apt/sources.list.d/bigbluebutton.list' \
|
||||
&& apt-get update
|
||||
|
||||
# create dummy packages to satisfy dependencies
|
||||
RUN equivs-control redis-server.control \
|
||||
@ -34,12 +45,6 @@ RUN equivs-control redis-server.control \
|
||||
&& equivs-control nginx.control \
|
||||
&& sed -i 's/<package name; defaults to equivs-dummy>/nginx/g' nginx.control \
|
||||
&& equivs-build nginx.control \
|
||||
&& equivs-control bbb-etherpad.control \
|
||||
&& sed -i 's/<package name; defaults to equivs-dummy>/bbb-etherpad/g' bbb-etherpad.control \
|
||||
&& equivs-build bbb-etherpad.control \
|
||||
&& equivs-control kurento-media-server.control \
|
||||
&& sed -i 's/<package name; defaults to equivs-dummy>/kurento-media-server/g' kurento-media-server.control \
|
||||
&& equivs-build kurento-media-server.control \
|
||||
&& equivs-control bbb-webrtc-sfu.control \
|
||||
&& sed -i 's/<package name; defaults to equivs-dummy>/bbb-webrtc-sfu/g' bbb-webrtc-sfu.control \
|
||||
&& equivs-build bbb-webrtc-sfu.control \
|
||||
@ -51,45 +56,24 @@ RUN rm -f /etc/systemd/system/nginx.service
|
||||
COPY dummy.service /etc/systemd/system/nginx.service
|
||||
COPY dummy.service /etc/systemd/system/redis.service
|
||||
COPY dummy.service /etc/systemd/system/redis-server.service
|
||||
COPY dummy.service /etc/systemd/system/kurento-media-server.service
|
||||
COPY dummy.service /etc/systemd/system/bbb-webrtc-sfu.service
|
||||
|
||||
RUN touch /etc/init.d/nginx && chmod +x /etc/init.d/nginx
|
||||
RUN apt-get update && apt-get install -y bbb-web bbb-record-core bbb-playback-presentation bbb-freeswitch-core \
|
||||
RUN apt-get update && apt-get install -y bbb-web bbb-freeswitch-core \
|
||||
bbb-fsesl-akka bbb-apps-akka bbb-transcode-akka bbb-apps bbb-apps-sip \
|
||||
bbb-apps-video bbb-apps-screenshare bbb-apps-video-broadcast
|
||||
|
||||
RUN mkdir -p /etc/nginx/sites-enabled /var/kurento
|
||||
|
||||
RUN apt-get install -y bbb-config
|
||||
|
||||
# -- Disable unneeded services
|
||||
RUN systemctl disable systemd-journal-flush
|
||||
RUN systemctl disable systemd-update-utmp.service
|
||||
|
||||
# -- Finish startup
|
||||
# Add a number there to force update of files on build
|
||||
RUN echo "Finishing ... @13"
|
||||
|
||||
RUN useradd bbb --uid 1000 -s /bin/bash
|
||||
RUN mkdir /home/bbb
|
||||
RUN chown bbb /home/bbb
|
||||
RUN sh -c 'echo "bbb ALL=(ALL:ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/bbb'
|
||||
RUN sh -c 'echo "bbb:bbb" | chpasswd'
|
||||
|
||||
# disable IPv6 support
|
||||
RUN rm -rf /opt/freeswitch/conf/sip_profiles/*-ipv6*
|
||||
|
||||
# disable all services
|
||||
# -- Disable unneeded services
|
||||
RUN find /etc/systemd/ | grep wants | xargs -r -n 1 basename | grep service | grep -v networking | grep -v tty | xargs -r -n 1 -I __ systemctl disable __
|
||||
RUN systemctl disable tomcat7
|
||||
RUN systemctl enable red5 freeswitch bbb-apps-akka bbb-transcode-akka bbb-fsesl-akka bbb-rap-caption-inbox bbb-web
|
||||
RUN systemctl disable systemd-journal-flush
|
||||
RUN systemctl disable systemd-update-utmp.service
|
||||
RUN systemctl enable red5 freeswitch bbb-apps-akka bbb-transcode-akka bbb-fsesl-akka bbb-web # bbb-rap-caption-inbox
|
||||
|
||||
COPY tomcat7 /etc/init.d/tomcat7
|
||||
RUN chmod +x /etc/init.d/tomcat7
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
COPY setup.sh /opt/setup.sh
|
||||
|
||||
ENTRYPOINT ["/bin/systemd", "--system", "--unit=multi-user.target"]
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD []
|
||||
|
10
mod/core/entrypoint.sh
Executable file
10
mod/core/entrypoint.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# print logs to stdout/stderr as soon as systemd is started
|
||||
sh -c 'sleep 5 && journalctl -f' &
|
||||
|
||||
dockerize \
|
||||
-template /opt/freeswitch/conf/vars.xml.tmpl:/opt/freeswitch/conf/vars.xml \
|
||||
-template /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties.tmpl:/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties \
|
||||
-template /usr/share/bbb-apps-akka/conf/application.conf.tmpl:/usr/share/bbb-apps-akka/conf/application.conf \
|
||||
/bin/systemd --system --unit=multi-user.target
|
@ -146,8 +146,8 @@ defaultGuestPolicy=ALWAYS_ACCEPT
|
||||
#
|
||||
# native2ascii -encoding UTF8 bigbluebutton.properties bigbluebutton.properties
|
||||
#
|
||||
defaultWelcomeMessage=Welcome to <b>%%CONFNAME%%</b>!<br><br>For help on using BigBlueButton see these (short) <a href="event:http://www.bigbluebutton.org/html5"><u>tutorial videos</u></a>.<br><br>To join the audio bridge click the phone button. Use a headset to avoid causing background noise for others.
|
||||
defaultWelcomeMessageFooter=This server is running <a href="http://docs.bigbluebutton.org/" target="_blank"><u>BigBlueButton</u></a>.
|
||||
defaultWelcomeMessage={{ .Env.WELCOME_MESSAGE }}
|
||||
defaultWelcomeMessageFooter={{ .Env.WELCOME_FOOTER }}
|
||||
|
||||
# Default maximum number of users a meeting can have.
|
||||
# Current default is 0 (meeting doesn't have a user limit).
|
||||
@ -219,7 +219,7 @@ keepEvents=false
|
||||
# This URL is where the BBB client is accessible. When a user sucessfully
|
||||
# enters a name and password, she is redirected here to load the client.
|
||||
# Do not commit changes to this field.
|
||||
bigbluebutton.web.serverURL=https://meet.livingutopia.org
|
||||
bigbluebutton.web.serverURL=https://{{ .Env.DOMAIN }}
|
||||
|
||||
|
||||
#----------------------------------------------------
|
||||
@ -259,7 +259,7 @@ defaultConfigURL=${bigbluebutton.web.serverURL}/client/conf/config.xml
|
||||
apiVersion=2.0
|
||||
|
||||
# Salt which is used by 3rd-party apps to authenticate api calls
|
||||
securitySalt=I8x5c5yzaXZktgXK00tEqSi3B17nQySH5ssDWzxwL4
|
||||
securitySalt={{ .Env.SHARED_SECRET }}
|
||||
|
||||
# Directory where we drop the <meeting-id-recorded>.done file
|
||||
recordStatusDir=/var/bigbluebutton/recording/status/recorded
|
||||
@ -319,7 +319,7 @@ accessControlAllowOrigin=${bigbluebutton.web.serverURL}
|
||||
checkBBBServerEvery=10
|
||||
|
||||
# The Red5 server where FS will publish as RTMP stream
|
||||
screenshareRtmpServer=meet.livingutopia.org
|
||||
screenshareRtmpServer={{ .Env.DOMAIN }}
|
||||
|
||||
# The Red5 app that receives the published RTMP stream
|
||||
screenshareRtmpBroadcastApp=video-broadcast
|
||||
|
Loading…
Reference in New Issue
Block a user