aboutsummaryrefslogtreecommitdiff
path: root/app/jitsi/build/jitsi-videobridge
diff options
context:
space:
mode:
Diffstat (limited to 'app/jitsi/build/jitsi-videobridge')
-rw-r--r--app/jitsi/build/jitsi-videobridge/0001-Disable-legacy-parameters.patch31
-rw-r--r--app/jitsi/build/jitsi-videobridge/Dockerfile21
-rwxr-xr-xapp/jitsi/build/jitsi-videobridge/jvb_run10
3 files changed, 47 insertions, 15 deletions
diff --git a/app/jitsi/build/jitsi-videobridge/0001-Disable-legacy-parameters.patch b/app/jitsi/build/jitsi-videobridge/0001-Disable-legacy-parameters.patch
new file mode 100644
index 0000000..69b83c0
--- /dev/null
+++ b/app/jitsi/build/jitsi-videobridge/0001-Disable-legacy-parameters.patch
@@ -0,0 +1,31 @@
+From b327e580ab83110cdb52bc1d11687a096b8fc1df Mon Sep 17 00:00:00 2001
+From: Quentin Dufour <quentin@dufour.io>
+Date: Mon, 1 Feb 2021 07:16:50 +0100
+Subject: [PATCH] Disable legacy parameters
+
+---
+ jvb/src/main/kotlin/org/jitsi/videobridge/Main.kt | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/jvb/src/main/kotlin/org/jitsi/videobridge/Main.kt b/jvb/src/main/kotlin/org/jitsi/videobridge/Main.kt
+index df71f480..8f0ef9a5 100644
+--- a/jvb/src/main/kotlin/org/jitsi/videobridge/Main.kt
++++ b/jvb/src/main/kotlin/org/jitsi/videobridge/Main.kt
+@@ -62,14 +62,6 @@ fun main(args: Array<String>) {
+ // to be passed.
+ System.setProperty("org.eclipse.jetty.util.log.class", "org.eclipse.jetty.util.log.JavaUtilLog")
+
+- // Before initializing the application programming interfaces (APIs) of
+- // Jitsi Videobridge, set any System properties which they use and which
+- // may be specified by the command-line arguments.
+- System.setProperty(
+- Videobridge.REST_API_PNAME,
+- cmdLine.getOptionValue("--apis").contains(Videobridge.REST_API).toString()
+- )
+-
+ // Reload the Typesafe config used by ice4j, because the original was initialized before the new system
+ // properties were set.
+ JitsiConfig.reloadNewConfig()
+--
+2.25.1
+
diff --git a/app/jitsi/build/jitsi-videobridge/Dockerfile b/app/jitsi/build/jitsi-videobridge/Dockerfile
index 4a3d504..2a32946 100644
--- a/app/jitsi/build/jitsi-videobridge/Dockerfile
+++ b/app/jitsi/build/jitsi-videobridge/Dockerfile
@@ -1,19 +1,16 @@
FROM debian:buster AS builder
-ARG PREFIXV
-ARG VERSION
-
RUN apt-get update && \
- apt-get install -y wget unzip maven openjdk-11-jdk-headless
+ apt-get install -y git unzip maven openjdk-11-jdk-headless
-RUN wget https://github.com/jitsi/jitsi-videobridge/archive/${PREFIXV}${VERSION}.zip -O jvb.zip
+ARG JVB_TAG
+RUN git clone --depth 1 --branch ${JVB_TAG} https://github.com/jitsi/jitsi-videobridge
-RUN unzip jvb.zip && \
- mv jitsi-videobridge*${VERSION} jvb && \
- cd jvb && \
- mvn package -DskipTests && \
- ls jvb/target && \
- unzip jvb/target/jitsi-videobridge*.zip && \
+WORKDIR jitsi-videobridge
+COPY *.patch .
+RUN git apply 0001-Disable-legacy-parameters.patch
+RUN mvn package -DskipTests
+RUN unzip jvb/target/jitsi-videobridge*.zip && \
mv jitsi-videobridge-*-SNAPSHOT build
FROM debian:buster
@@ -21,7 +18,7 @@ FROM debian:buster
RUN apt-get update && \
apt-get install -y openjdk-11-jre-headless curl
-COPY --from=builder /jvb/build /usr/share/jvb
+COPY --from=builder /jitsi-videobridge/build /usr/share/jvb
COPY jvb_run /usr/local/bin/jvb_run
CMD ["/usr/local/bin/jvb_run"]
diff --git a/app/jitsi/build/jitsi-videobridge/jvb_run b/app/jitsi/build/jitsi-videobridge/jvb_run
index 3a78c46..c82712c 100755
--- a/app/jitsi/build/jitsi-videobridge/jvb_run
+++ b/app/jitsi/build/jitsi-videobridge/jvb_run
@@ -9,10 +9,15 @@ if [ -z "${JITSI_NAT_PUBLIC_IP}" ]; then
JITSI_NAT_PUBLIC_IP=$(curl https://ifconfig.me)
fi
+if [ -z "${JVB_MEMORY}" ]; then
+ echo "You must set the env variable 'JVB_MEMORY'. eg: JVB_MEMORY=3072m"
+ exit 1
+fi
+
echo "NAT config: ${JITSI_NAT_LOCAL_IP} -> ${JITSI_NAT_PUBLIC_IP}"
exec java \
- -Xmx3072m \
+ -Xmx${JVB_MEMORY} \
-XX:+UseConcMarkSweepGC \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath=/tmp \
@@ -22,5 +27,4 @@ exec java \
-Dorg.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=${JITSI_NAT_LOCAL_IP} \
-Dorg.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=${JITSI_NAT_PUBLIC_IP} \
-cp '/usr/share/jvb/jitsi-videobridge.jar:/usr/share/jvb/lib/*' \
- org.jitsi.videobridge.MainKt \
- --apis=rest,xmpp
+ org.jitsi.videobridge.MainKt