Przeglądaj źródła

jvb: add ability to configure the shutdown API

Артем 3 lat temu
rodzic
commit
192a623

+ 2 - 0
docker-compose.yml

@@ -282,6 +282,8 @@ services:
             - SENTRY_DSN="${JVB_SENTRY_DSN:-0}"
             - SENTRY_ENVIRONMENT
             - SENTRY_RELEASE
+            - COLIBRI_REST_ENABLED
+            - SHUTDOWN_REST_ENABLED
             - TZ
             - XMPP_AUTH_DOMAIN
             - XMPP_INTERNAL_MUC_DOMAIN

+ 4 - 0
env.example

@@ -403,3 +403,7 @@ RESTART_POLICY=unless-stopped
 
 # Optional release info to filter events
 #SENTRY_RELEASE=1.0.0
+
+# Optional properties for shutdown api
+#COLIBRI_REST_ENABLED=true
+#SHUTDOWN_REST_ENABLED=true

+ 2 - 0
examples/traefik-v2/docker-compose.yml

@@ -252,6 +252,8 @@ services:
             - JVB_WS_DOMAIN
             - JVB_WS_SERVER_ID
             - PUBLIC_URL
+            - COLIBRI_REST_ENABLED
+            - SHUTDOWN_REST_ENABLED
             - TZ
         depends_on:
             - prosody

+ 2 - 0
examples/traefik/docker-compose.yml

@@ -166,6 +166,8 @@ services:
             - JVB_TCP_PORT
             - JVB_STUN_SERVERS
             - JVB_ENABLE_APIS
+            - COLIBRI_REST_ENABLED
+            - SHUTDOWN_REST_ENABLED
             - TZ
         depends_on:
             - prosody

+ 10 - 0
jvb/rootfs/defaults/jvb.conf

@@ -5,6 +5,8 @@
 {{ $PUBLIC_URL_DOMAIN := .Env.PUBLIC_URL | default "https://localhost:8443" | trimPrefix "https://" | trimSuffix "/" -}}
 {{ $WS_DOMAIN := .Env.JVB_WS_DOMAIN | default $PUBLIC_URL_DOMAIN -}}
 {{ $WS_SERVER_ID := .Env.JVB_WS_SERVER_ID | default .Env.LOCAL_ADDRESS -}}
+{{ $COLIBRI_REST_ENABLED := .Env.COLIBRI_REST_ENABLED | default "false" | toBool }}
+{{ $SHUTDOWN_REST_ENABLED := .Env.SHUTDOWN_REST_ENABLED | default "false" | toBool }}
 
 videobridge {
     ice {
@@ -33,6 +35,14 @@ videobridge {
                 }
             }
         }
+        rest {
+            enabled = {{ $COLIBRI_REST_ENABLED }}
+        }
+    }
+    rest {
+        shutdown {
+            enabled = {{ $SHUTDOWN_REST_ENABLED }}
+        }
     }
     stats {
         enabled = true