forked from extern/docker
🎉 no 'core' and dependency on the ubuntu repository anymore! (rewrite of bbb-web)
This commit is contained in:
parent
fbc88a947e
commit
f7f35d75cd
@ -1,8 +1,8 @@
|
||||
version: '3.6'
|
||||
|
||||
services:
|
||||
core:
|
||||
build: mod/core
|
||||
bbb-web:
|
||||
build: mod/bbb-web
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- redis
|
||||
@ -117,7 +117,6 @@ services:
|
||||
depends_on:
|
||||
- redis
|
||||
- kurento
|
||||
- core
|
||||
environment:
|
||||
CLIENT_HOST: 0.0.0.0
|
||||
KURENTO_NAME: kurento
|
||||
|
100
mod/bbb-web/Dockerfile
Normal file
100
mod/bbb-web/Dockerfile
Normal file
@ -0,0 +1,100 @@
|
||||
FROM mozilla/sbt:8u181_1.2.7 AS builder
|
||||
|
||||
RUN apt-get update && apt-get install -y subversion
|
||||
|
||||
# download bbb-common-message
|
||||
ENV TAG_COMMON_MESSAGE v2.3-alpha-2
|
||||
RUN svn checkout https://github.com/bigbluebutton/bigbluebutton/tags/$TAG_COMMON_MESSAGE/bbb-common-message /bbb-common-message \
|
||||
&& rm -rf /bbb-common-message/.svn
|
||||
|
||||
# compile bbb-common-message
|
||||
RUN cd /bbb-common-message \
|
||||
&& ./deploy.sh
|
||||
|
||||
# ===================================================
|
||||
|
||||
# install grails
|
||||
RUN cd /opt \
|
||||
&& wget https://github.com/grails/grails-core/releases/download/v3.3.9/grails-3.3.9.zip \
|
||||
&& unzip grails-3.3.9.zip
|
||||
ENV PATH="/opt/grails-3.3.9/bin:${PATH}"
|
||||
|
||||
# install gradle
|
||||
RUN cd /opt \
|
||||
&& wget https://services.gradle.org/distributions/gradle-6.7-bin.zip \
|
||||
&& unzip gradle-6.7-bin
|
||||
ENV PATH="/opt/gradle-6.7/bin:${PATH}"
|
||||
|
||||
# download bbb-common-web
|
||||
ENV TAG_COMMON_WEB v2.3-alpha-2
|
||||
RUN svn checkout https://github.com/bigbluebutton/bigbluebutton/tags/$TAG_COMMON_WEB/bbb-common-web /bbb-common-web \
|
||||
&& rm -rf /bbb-common-message/.svn
|
||||
|
||||
# compile bbb-common-web
|
||||
RUN cd /bbb-common-web \
|
||||
&& ./deploy.sh
|
||||
|
||||
# download bbb-web
|
||||
ENV TAG_WEB v2.3-alpha-2
|
||||
RUN svn checkout https://github.com/bigbluebutton/bigbluebutton/tags/$TAG_WEB/bigbluebutton-web /bbb-web \
|
||||
&& rm -rf /bbb-web/.svn
|
||||
|
||||
# compile bbb-web
|
||||
RUN cd /bbb-web && grails assemble
|
||||
|
||||
# compile pres-checker
|
||||
RUN cd /bbb-web/pres-checker && gradle resolveDeps
|
||||
|
||||
|
||||
|
||||
# ===================================================
|
||||
FROM openjdk:8-jre-slim-buster
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
wget unzip gosu socat locales \
|
||||
imagemagick xpdf-utils
|
||||
|
||||
# set locale
|
||||
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LANGUAGE en_US:en
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
|
||||
# add user & group
|
||||
RUN groupadd -g 998 bigbluebutton && useradd -m -u 998 -g bigbluebutton bigbluebutton
|
||||
|
||||
# add dockerize
|
||||
ENV DOCKERIZE_VERSION v0.6.1
|
||||
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
|
||||
|
||||
|
||||
# add blank presentation files and allow conversation to pdf/svg
|
||||
RUN mkdir -p /usr/share/bigbluebutton/blank \
|
||||
&& cd /usr/share/bigbluebutton/blank \
|
||||
&& wget \
|
||||
https://raw.githubusercontent.com/bigbluebutton/bigbluebutton/v2.3-alpha-2/bigbluebutton-config/slides/blank-svg.svg \
|
||||
https://raw.githubusercontent.com/bigbluebutton/bigbluebutton/v2.3-alpha-2/bigbluebutton-config/slides/blank-thumb.png \
|
||||
https://raw.githubusercontent.com/bigbluebutton/bigbluebutton/v2.3-alpha-2/bigbluebutton-config/slides/blank-presentation.pdf \
|
||||
https://raw.githubusercontent.com/bigbluebutton/bigbluebutton/v2.3-alpha-2/bigbluebutton-config/slides/blank-png.png \
|
||||
&& sed -i 's/<policy domain="coder" rights="none" pattern="PDF" \/>/<policy domain="coder" rights="write" pattern="PDF" \/>/g' /etc/ImageMagick-6/policy.xml
|
||||
|
||||
# get and extract bbb-web
|
||||
COPY --from=builder /bbb-web/build/libs/bigbluebutton-0.10.0.war /bigbluebutton-0.10.0.war
|
||||
RUN mkdir -p /usr/share/bbb-web \
|
||||
&& cd /usr/share/bbb-web \
|
||||
&& unzip -q /bigbluebutton-0.10.0.war -d /usr/share/bbb-web
|
||||
|
||||
# get pres-checker
|
||||
COPY --from=builder /bbb-web/pres-checker/lib /usr/share/prescheck/lib
|
||||
COPY --from=builder /bbb-web/pres-checker/run.sh /usr/share/prescheck/prescheck.sh
|
||||
|
||||
# add entrypoint and templates
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
COPY bigbluebutton.properties /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties.tmpl
|
||||
COPY turn-stun-servers.xml /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml.tmpl
|
||||
COPY logback.xml /usr/share/bbb-web/WEB-INF/classes/logback.xml
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
17
mod/bbb-web/entrypoint.sh
Executable file
17
mod/bbb-web/entrypoint.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# forward libreoffice ports to this container
|
||||
for i in `seq 1 4` ; do
|
||||
let PORT=8200+${i}
|
||||
echo "forward port $PORT to the libreoffice container"
|
||||
socat TCP-LISTEN:$PORT,fork TCP:10.7.7.7:$PORT &
|
||||
done
|
||||
|
||||
cd /usr/share/bbb-web/
|
||||
dockerize \
|
||||
-template /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties.tmpl:/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties \
|
||||
-template /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml.tmpl:/usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml \
|
||||
gosu bigbluebutton java -Dgrails.env=prod -Dserver.address=0.0.0.0 -Dserver.port=8090 -Xms384m -Xmx384m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/bigbluebutton/diagnostics -cp WEB-INF/lib/*:/:WEB-INF/classes/:. org.springframework.boot.loader.WarLauncher
|
||||
|
||||
|
28
mod/bbb-web/logback.xml
Normal file
28
mod/bbb-web/logback.xml
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<appender name="STDOUT"
|
||||
class="ch.qos.logback.core.ConsoleAppender">
|
||||
<layout class="ch.qos.logback.classic.PatternLayout">
|
||||
<Pattern>%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"} %-5level %logger{35} - %msg%n</Pattern>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<logger name="akka" level="INFO" />
|
||||
<logger name="io.lettuce" level="INFO" />
|
||||
<logger name="org.bigbluebutton" level="DEBUG" />
|
||||
|
||||
<logger name="grails.app.controllers" level="DEBUG" />
|
||||
<logger name="grails.app.services" level="DEBUG" />
|
||||
|
||||
<logger name="org.grails.web.servlet" level="ERROR" />
|
||||
<logger name="org.grails.web.pages" level="ERROR" />
|
||||
<logger name="org.grails.web.sitemesh" level="ERROR" />
|
||||
<logger name="org.grails.web.mapping.filter" level="ERROR" />
|
||||
<logger name="org.grails.web.mapping" level="ERROR" />
|
||||
<logger name="org.grails.commons" level="ERROR" />
|
||||
<logger name="org.springframework" level="ERROR" />
|
||||
|
||||
<root level="ERROR">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
</configuration>
|
@ -1,78 +0,0 @@
|
||||
FROM ubuntu:18.04
|
||||
MAINTAINER ffdixon@bigbluebutton.org
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV container docker
|
||||
ENV DOCKERIZE_VERSION v0.6.1
|
||||
|
||||
RUN apt-get update && apt-get install -y software-properties-common language-pack-en wget apt-utils
|
||||
RUN update-locale LANG=en_US.UTF-8
|
||||
|
||||
# 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 supervisor apt-transport-https equivs haveged fonts-crosextra-carlito fonts-crosextra-caladea fonts-noto net-tools socat
|
||||
|
||||
# add bigbluebutton user manually so the ID is constant
|
||||
RUN groupadd -g 998 bigbluebutton && useradd -m -u 998 -g bigbluebutton bigbluebutton
|
||||
|
||||
# bbb repo & packages
|
||||
RUN LC_CTYPE=C.UTF-8 add-apt-repository ppa:bigbluebutton/support
|
||||
RUN sh -c 'wget https://packages-eu.bigbluebutton.org/repo/bigbluebutton.asc -O- | apt-key add -' \
|
||||
&& sh -c 'echo "deb https://ubuntu.bigbluebutton.org/bionic-230-dev bigbluebutton-bionic main" > /etc/apt/sources.list.d/bigbluebutton.list'
|
||||
|
||||
# create dummy packages to satisfy dependencies
|
||||
RUN equivs-control redis-server.control \
|
||||
&& sed -i 's/<package name; defaults to equivs-dummy>/redis-server/g' redis-server.control \
|
||||
&& equivs-build redis-server.control \
|
||||
&& dpkg -i /*.deb \
|
||||
&& rm /*.deb
|
||||
|
||||
RUN equivs-control bbb-libreoffice-docker.control \
|
||||
&& sed -i 's/<package name; defaults to equivs-dummy>/bbb-libreoffice-docker/g' bbb-libreoffice-docker.control \
|
||||
&& equivs-build bbb-libreoffice-docker.control \
|
||||
&& dpkg -i /*.deb \
|
||||
&& rm /*.deb
|
||||
|
||||
RUN echo '#!/bin/bash\necho "mocking: systemctl $@"' > /usr/bin/systemctl && chmod +x /usr/bin/systemctl
|
||||
|
||||
# this variable is not used, but it triggers
|
||||
# rebuilding from here on if changed
|
||||
ENV VERSION v2.3-alpha-2
|
||||
|
||||
RUN apt-get update && apt-get install -y bbb-web openjdk-8-jre-headless
|
||||
|
||||
# add blank presentation files and allow conversation to pdf/svg
|
||||
RUN mkdir -p /usr/share/bigbluebutton/blank \
|
||||
&& wget -O /usr/share/bigbluebutton/blank/blank-svg.svg https://raw.githubusercontent.com/bigbluebutton/bigbluebutton/$VERSION/bigbluebutton-config/slides/blank-svg.svg \
|
||||
&& wget -O /usr/share/bigbluebutton/blank/blank-thumb.png https://raw.githubusercontent.com/bigbluebutton/bigbluebutton/$VERSION/bigbluebutton-config/slides/blank-thumb.png \
|
||||
&& wget -O /usr/share/bigbluebutton/blank/blank-presentation.pdf https://raw.githubusercontent.com/bigbluebutton/bigbluebutton/$VERSION/bigbluebutton-config/slides/blank-presentation.pdf \
|
||||
&& wget -O /usr/share/bigbluebutton/blank/blank-png.png https://raw.githubusercontent.com/bigbluebutton/bigbluebutton/$VERSION/bigbluebutton-config/slides/blank-png.png \
|
||||
&& sed -i 's/<policy domain="coder" rights="none" pattern="PDF" \/>/<policy domain="coder" rights="write" pattern="PDF" \/>/g' /etc/ImageMagick-6/policy.xml
|
||||
|
||||
|
||||
# -- copy configuration files
|
||||
|
||||
COPY web/bigbluebutton.properties /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties.tmpl
|
||||
COPY web/turn-stun-servers.xml /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml.tmpl
|
||||
|
||||
COPY web-run.sh /usr/share/bbb-web/run-prod.sh
|
||||
|
||||
# add default presentation thumbnail
|
||||
RUN mkdir -p /usr/share/bigbluebutton/blank \
|
||||
&& wget -O /usr/share/bigbluebutton/blank/blank-thumb.png https://raw.githubusercontent.com/bigbluebutton/bigbluebutton/v2.2.20/bigbluebutton-config/slides/blank-thumb.png
|
||||
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
COPY prefix-log /usr/local/bin/prefix-log
|
||||
RUN mkdir -p /var/log/supervisor
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD []
|
@ -1,6 +0,0 @@
|
||||
# bbb-core
|
||||
based on the bigbluebutton/docker with bbb-install.sh setup, but got so far reduced to following components:
|
||||
- bbb-web
|
||||
- bbb-fsesl-akka
|
||||
- bbb-apps-akka
|
||||
- bbb-transcode-akka
|
@ -1,34 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
# generate bbb folders
|
||||
mkdir -p /var/bigbluebutton/events
|
||||
mkdir -p /var/bigbluebutton/captions
|
||||
mkdir -p /var/bigbluebutton/captions/inbox
|
||||
mkdir -p /var/bigbluebutton/basic_stats
|
||||
mkdir -p /var/bigbluebutton/recording/raw
|
||||
mkdir -p /var/bigbluebutton/recording/process
|
||||
mkdir -p /var/bigbluebutton/recording/publish
|
||||
mkdir -p /var/bigbluebutton/recording/publish/presentation
|
||||
mkdir -p /var/bigbluebutton/recording/status
|
||||
mkdir -p /var/bigbluebutton/recording/status/recorded
|
||||
mkdir -p /var/bigbluebutton/recording/status/archived
|
||||
mkdir -p /var/bigbluebutton/recording/status/processed
|
||||
mkdir -p /var/bigbluebutton/recording/status/sanity
|
||||
mkdir -p /var/bigbluebutton/published
|
||||
mkdir -p /var/bigbluebutton/published/presentation
|
||||
mkdir -p /var/bigbluebutton/deleted
|
||||
mkdir -p /var/bigbluebutton/unpublished
|
||||
mkdir -p /var/bigbluebutton/playback
|
||||
|
||||
# add playback-presentation to /var/bigbluebutton volume
|
||||
cp -r /usr/src/bbb-src-playback/* /var/bigbluebutton/playback
|
||||
|
||||
# -- fix directory permissions
|
||||
chown -R bigbluebutton:bigbluebutton /var/bigbluebutton
|
||||
|
||||
dockerize \
|
||||
-template /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties.tmpl:/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties \
|
||||
-template /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml.tmpl:/usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml \
|
||||
/usr/bin/supervisord --nodaemon
|
@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# setup fd-3 to point to the original stdout
|
||||
exec 3>&1
|
||||
# setup fd-4 to point to the original stderr
|
||||
exec 4>&2
|
||||
|
||||
# get the prefix from SUPERVISOR_PROCESS_NAME environement variable
|
||||
printf -v PREFIX "%-14.14s" ${SUPERVISOR_PROCESS_NAME}
|
||||
|
||||
# reassign stdout and stderr to a preprocessed and redirected to the original stdout/stderr (3 and 4) we have create eralier
|
||||
exec 1> >( perl -ne '$| = 1; print "'"${PREFIX}"' | $_"' >&3)
|
||||
exec 2> >( perl -ne '$| = 1; print "'"${PREFIX}"' | $_"' >&4)
|
||||
|
||||
# from here on everthing that outputs to stdout/stderr will be go through the perl script
|
||||
|
||||
exec "$@"
|
@ -1,8 +0,0 @@
|
||||
[program:bbb-web]
|
||||
command=/usr/local/bin/prefix-log /usr/share/bbb-web/run-prod.sh
|
||||
user=bigbluebutton
|
||||
directory=/usr/share/bbb-web
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/fd/2
|
||||
stderr_logfile_maxbytes=0
|
@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# forward libreoffice ports to this container
|
||||
for i in `seq 1 4` ; do
|
||||
let PORT=8200+${i}
|
||||
echo "forward port $PORT to the libreoffice container"
|
||||
socat TCP-LISTEN:$PORT,fork TCP:10.7.7.7:$PORT &
|
||||
done
|
||||
|
||||
java -Dgrails.env=prod -Dserver.address=0.0.0.0 -Dserver.port=8090 -Xms384m -Xmx384m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/bigbluebutton/diagnostics -cp WEB-INF/lib/*:/:WEB-INF/classes/:. org.springframework.boot.loader.WarLauncher
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user