Explorar el Código

jvb: add JVB_ENABLE_APIS env var

Louis Sivillo hace 6 años
padre
commit
e1bd2447ae
Se han modificado 4 ficheros con 10 adiciones y 2 borrados
  1. 1 0
      README.md
  2. 1 0
      docker-compose.yml
  3. 4 0
      env.example
  4. 4 2
      jvb/rootfs/etc/services.d/jvb/run

+ 1 - 0
README.md

@@ -140,6 +140,7 @@ Variable | Description | Default value
 `JVB_STUN_SERVERS` | STUN servers used to discover the server's public IP | stun.l.google.com:19302, stun1.l.google.com:19302, stun2.l.google.com:19302
 `JVB_PORT` | Port for media used by Jitsi Videobridge | 10000
 `JVB_BREWERY_MUC` | MUC name for the JVB pool | jvbbrewery
+`JVB_ENABLE_APIS` | Comma separated list of JVB APIs to enable | none
 `JIGASI_XMPP_USER` | XMPP user for Jigasi MUC client connections | jigasi
 `JIGASI_XMPP_PASSWORD` | XMPP password for Jigasi MUC client connections | passw0rd
 `JIGASI_BREWERY_MUC` | MUC name for the Jigasi pool | jigasibrewery

+ 1 - 0
docker-compose.yml

@@ -91,6 +91,7 @@ services:
             - JVB_BREWERY_MUC
             - JVB_PORT
             - JVB_STUN_SERVERS
+            - JVB_ENABLE_APIS
             - JICOFO_AUTH_USER
             - TZ
         depends_on:

+ 4 - 0
env.example

@@ -77,6 +77,10 @@ JVB_STUN_SERVERS=stun.l.google.com:19302,stun1.l.google.com:19302,stun2.l.google
 # Media port for the Jitsi Videobridge
 JVB_PORT=10000
 
+# A comma separated list of APIs to enable when the JVB is started. The default is none.
+# See https://github.com/jitsi/jitsi-videobridge/blob/master/doc/rest.md for more information
+#JVB_ENABLE_APIS=rest,colibri
+
 # XMPP component password for Jicofo.
 JICOFO_COMPONENT_SECRET=s3cr37
 

+ 4 - 2
jvb/rootfs/etc/services.d/jvb/run

@@ -8,7 +8,9 @@ if [[ ! -z "$DOCKER_HOST_ADDRESS" ]]; then
 fi
 
 DAEMON=/usr/share/jitsi-videobridge/jvb.sh
-DAEMON_OPTS="--apis=none"
+DEFAULT_DAEMON_OPTS="none"
 
-exec s6-setuidgid jvb /bin/bash -c "JAVA_SYS_PROPS=\"$JAVA_SYS_PROPS\" exec $DAEMON $DAEMON_OPTS"
+DAEMON_OPTS=${JVB_ENABLE_APIS:=$DEFAULT_DAEMON_OPTS}
+
+exec s6-setuidgid jvb /bin/bash -c "JAVA_SYS_PROPS=\"$JAVA_SYS_PROPS\" exec $DAEMON --apis=${DAEMON_OPTS}"