From 656a9b881299c9b58fa7e5bcacb5d572bcb6edf5 Mon Sep 17 00:00:00 2001 From: chandi Date: Fri, 10 Apr 2020 11:29:44 +0200 Subject: [PATCH] dockerize templates for core, cleanup Dockerfile --- docker-compose.yml | 25 ++- mod/base/setup.sh | 67 ------- mod/base/tomcat7 | 287 --------------------------- mod/{base => core}/Dockerfile | 70 +++---- mod/{base => core}/bigbluebutton.yml | 0 mod/{base => core}/dummy.service | 0 mod/core/entrypoint.sh | 10 + mod/{base => core}/sources.list | 0 mod/web/bigbluebutton.properties | 10 +- mod/web/override.conf | 0 10 files changed, 56 insertions(+), 413 deletions(-) delete mode 100755 mod/base/setup.sh delete mode 100755 mod/base/tomcat7 rename mod/{base => core}/Dockerfile (58%) rename mod/{base => core}/bigbluebutton.yml (100%) rename mod/{base => core}/dummy.service (100%) create mode 100755 mod/core/entrypoint.sh rename mod/{base => core}/sources.list (100%) delete mode 100644 mod/web/override.conf diff --git a/docker-compose.yml b/docker-compose.yml index 9ce6e70..11a960a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 diff --git a/mod/base/setup.sh b/mod/base/setup.sh deleted file mode 100755 index d185c87..0000000 --- a/mod/base/setup.sh +++ /dev/null @@ -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 diff --git a/mod/base/tomcat7 b/mod/base/tomcat7 deleted file mode 100755 index 1e4a45a..0000000 --- a/mod/base/tomcat7 +++ /dev/null @@ -1,287 +0,0 @@ -#!/bin/sh -# -# /etc/init.d/tomcat7 -- startup script for the Tomcat 6 servlet engine -# -# Written by Miquel van Smoorenburg . -# Modified for Debian GNU/Linux by Ian Murdock . -# Modified for Tomcat by Stefan Gybas . -# Modified for Tomcat6 by Thierry Carrez . -# Modified for Tomcat7 by Ernesto Hernandez-Novich . -# Additional improvements by Jason Brittain . -# -### 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 diff --git a/mod/base/Dockerfile b/mod/core/Dockerfile similarity index 58% rename from mod/base/Dockerfile rename to mod/core/Dockerfile index 25c74d7..c8ac1eb 100644 --- a/mod/base/Dockerfile +++ b/mod/core/Dockerfile @@ -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//nginx/g' nginx.control \ && equivs-build nginx.control \ - && equivs-control bbb-etherpad.control \ - && sed -i 's//bbb-etherpad/g' bbb-etherpad.control \ - && equivs-build bbb-etherpad.control \ - && equivs-control kurento-media-server.control \ - && sed -i 's//kurento-media-server/g' kurento-media-server.control \ - && equivs-build kurento-media-server.control \ && equivs-control bbb-webrtc-sfu.control \ && sed -i 's//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 [] diff --git a/mod/base/bigbluebutton.yml b/mod/core/bigbluebutton.yml similarity index 100% rename from mod/base/bigbluebutton.yml rename to mod/core/bigbluebutton.yml diff --git a/mod/base/dummy.service b/mod/core/dummy.service similarity index 100% rename from mod/base/dummy.service rename to mod/core/dummy.service diff --git a/mod/core/entrypoint.sh b/mod/core/entrypoint.sh new file mode 100755 index 0000000..514edfe --- /dev/null +++ b/mod/core/entrypoint.sh @@ -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 \ No newline at end of file diff --git a/mod/base/sources.list b/mod/core/sources.list similarity index 100% rename from mod/base/sources.list rename to mod/core/sources.list diff --git a/mod/web/bigbluebutton.properties b/mod/web/bigbluebutton.properties index c09a0db..44f94f9 100644 --- a/mod/web/bigbluebutton.properties +++ b/mod/web/bigbluebutton.properties @@ -146,8 +146,8 @@ defaultGuestPolicy=ALWAYS_ACCEPT # # native2ascii -encoding UTF8 bigbluebutton.properties bigbluebutton.properties # -defaultWelcomeMessage=Welcome to %%CONFNAME%%!

For help on using BigBlueButton see these (short) tutorial videos.

To join the audio bridge click the phone button. Use a headset to avoid causing background noise for others. -defaultWelcomeMessageFooter=This server is running BigBlueButton. +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 .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 diff --git a/mod/web/override.conf b/mod/web/override.conf deleted file mode 100644 index e69de29..0000000