From e8fde8cb8c018d79e7843ac6e6d0a7bd8cadcf71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Wed, 19 Sep 2018 22:12:57 +0200 Subject: [PATCH] core: make HTTP, HTTPS and JVB ports configurable --- README.md | 3 +++ docker-compose.yml | 7 ++++--- env.example | 9 +++++++++ jvb/Dockerfile | 2 -- jvb/rootfs/defaults/sip-communicator.properties | 1 + 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 193473f..4937a3e 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,8 @@ Variable | Description | Example --- | --- | --- `CONFIG` | Directory where all configuration will be stored | /opt/jitsi-meet-cfg `TZ` | System Time Zone | Europe/Amsterdam +`HTTP_PORT` | Exposed port for HTTP traffic | 8000 +`HTTPS_PORT` | Exposed port for HTTPS traffic | 8443 `JVB_COMPONENT_SECRET` | XMPP component password for Jitsi Videobridge | s3cr3t `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 `JICOFO_COMPONENT_SECRET` | XMPP component password for Jicofo | s3cr37 @@ -101,6 +103,7 @@ Variable | Description | Default value `XMPP_BOSH_URL_BASE` | Base URL for XMPP BOSH connections | http://xmpp.meet.jitsi:5280 `XMPP_MUC_DOMAIN` | XMPP domain for the MUC | muc.meet.jitsi `JICOFO_AUTH_USER` | XMPP user for Jicofo client connections | focus +`JVB_PORT` | Port for media used by Jitsi Videobridge | 10000 ### Running on a LAN environment diff --git a/docker-compose.yml b/docker-compose.yml index 27d5faf..7c92582 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,8 +5,8 @@ services: web: image: jitsi/web ports: - - '8000:80' - - '8443:443' + - '${HTTP_PORT}:80' + - '${HTTPS_PORT}:443' volumes: - ${CONFIG}/meet:/config environment: @@ -62,7 +62,7 @@ services: jvb: image: jitsi/jvb ports: - - "10000:10000/udp" + - '${JVB_PORT}:${JVB_PORT}/udp' volumes: - ${CONFIG}/jvb:/config environment: @@ -71,6 +71,7 @@ services: - XMPP_AUTH_DOMAIN - XMPP_SERVER=xmpp.meet.jitsi - JVB_COMPONENT_SECRET + - JVB_PORT - JVB_STUN_SERVERS - JICOFO_AUTH_USER - TZ diff --git a/env.example b/env.example index 8765a83..ce3cb4f 100644 --- a/env.example +++ b/env.example @@ -1,6 +1,12 @@ # Directory where all configuration will be stored. CONFIG=~/.jitsi-meet-cfg +# Exposed HTTP port. +HTTP_PORT=8000 + +# Exposed HTTPS port. +HTTPS_PORT=8443 + # System time zone. TZ=Europe/Amsterdam @@ -23,6 +29,9 @@ JVB_COMPONENT_SECRET=s3cr3t # STUN servers used to discover the server's public IP. JVB_STUN_SERVERS=stun.l.google.com:19302,stun1.l.google.com:19302,stun2.l.google.com:19302 +# Media port for the Jitsi Videobridge +JVB_PORT=10000 + # XMPP component password for Jicofo. JICOFO_COMPONENT_SECRET=s3cr37 diff --git a/jvb/Dockerfile b/jvb/Dockerfile index 5891104..30f3ea5 100644 --- a/jvb/Dockerfile +++ b/jvb/Dockerfile @@ -8,5 +8,3 @@ RUN \ COPY rootfs/ / VOLUME /config - -EXPOSE 10000/udp diff --git a/jvb/rootfs/defaults/sip-communicator.properties b/jvb/rootfs/defaults/sip-communicator.properties index 589808a..670d2b6 100644 --- a/jvb/rootfs/defaults/sip-communicator.properties +++ b/jvb/rootfs/defaults/sip-communicator.properties @@ -1,4 +1,5 @@ org.jitsi.videobridge.AUTHORIZED_SOURCE_REGEXP={{ .Env.JICOFO_AUTH_USER }}@{{ .Env.XMPP_AUTH_DOMAIN }}/.* +org.jitsi.videobridge.SINGLE_PORT_HARVESTER_PORT={{ .Env.JVB_PORT }} org.jitsi.videobridge.DISABLE_TCP_HARVESTER=true org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES={{ .Env.JVB_STUN_SERVERS }} org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=