diff --git a/.github/workflows/docker-publish-individual.yml b/.github/workflows/docker-publish-individual.yml index b2f0e1f028..05a36fddb7 100644 --- a/.github/workflows/docker-publish-individual.yml +++ b/.github/workflows/docker-publish-individual.yml @@ -6,6 +6,14 @@ on: folder: required: true type: string + repository: + required: false + type: string + default: "" + ref: + required: false + type: string + default: "" secrets: github-token: required: true @@ -25,10 +33,18 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 + + - name: Checkout other repository + uses: actions/checkout@v4 + with: + repository: ${{ inputs.repository }} + ref: ${{ inputs.ref }} + path: ${{ inputs.folder }} + if: ${{ inputs.repository != '' }} - name: Log into registry ${{ env.REGISTRY }} - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -36,7 +52,7 @@ jobs: - name: Extract Docker metadata id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY_BASE_PATH }}/${{ inputs.folder }} # Turn off auto-latest, as we want to exclude openshift tags from that @@ -44,7 +60,7 @@ jobs: latest=false - name: Build and push Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: "${{ inputs.folder }}" push: ${{ github.event_name != 'pull_request' }} diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 93b46d993a..f3892fe97c 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -84,3 +84,12 @@ jobs: folder: web secrets: github-token: ${{ secrets.GITHUB_TOKEN }} + + build-push-excalidraw: + uses: ./.github/workflows/docker-publish-individual.yml + with: + folder: excalidraw-backend + repository: jitsi/excalidraw-backend + ref: "x21" + secrets: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index e8a8a6f99d..6926237034 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,44 @@ +## stable-9364-1 + +Based on stable release 9364-1. + +* a5ebb99 jibri: flag to support prometheus-style metrics (#1768) +* 80fc10e feat(prosody): Cleans up gc settings. +* 69bba17 feat(prosody): Adjusts lua to use generational GC for brewery.cfg.lua. +* 2798426 feat(prosody): Adjusts lua to use generational GC. +* 28d2b32 feat(prosody): Make sure muc tumbstones is disabled. +* d5df19d jigasi: autoscaler sidecar support (#1738) +* 0953ca0 jigasi: skip SIP configuration when configured as a transcriber +* ca1d670 fix: :bug: wrong quote in default config (#1761) +* 360361e jibri: move xmpp config for easier override (#1748) +* 452f5ba misc: working on unstable + +## stable-9364 + +Based on stable release 9364. + +* ca61ea2 jibri: add ability to ignore certificate errors +* 615396e java: use Java 17 +* 140db22 jibri: check for chrome bin before pre-warm (#1757) +* 648612f feat(prosody): Always report visitors support when enabled. +* 28f3cf8 jvb: lipcap from apt to allow for pcap dumps (#1747) +* 33350c3 prosody: fix env var default value +* d6dc1e3 base-java: install nodejs 20 from nodesource +* 8f84f2f jibri: use storage.googleapis.com location for chromedriver +* 1bbb4ab fix(prosody): Updates a rate whitelist config that changed in jitsi-meet. (#1741) +* eccf68e misc: working on unstable + +## stable-9258 + +Based on stable release 9258. + +* a198d56 compose: add jvb dependency to web container (#1739) +* 5c5742b prosody: var for speakerstats modules +* a1d1f2c web: Add env vars for setting 1080p and 4k bitrates. +* bb69407 Remove "ping" in ViarualHosts (#1728) +* 14efd9c prosody: disable "offline" and "register" modules. (#1727) +* 8e28256 misc: working on unstable + ## stable-9220-1 Based on stable release 9220-1. diff --git a/base-java/Dockerfile b/base-java/Dockerfile index c28dc6043b..9bd9389a0e 100644 --- a/base-java/Dockerfile +++ b/base-java/Dockerfile @@ -3,6 +3,11 @@ ARG BASE_TAG=latest FROM ${JITSI_REPO}/base:${BASE_TAG} RUN mkdir -p /usr/share/man/man1 && \ + mkdir -p /etc/apt/keyrings/ && \ apt-dpkg-wrap apt-get update && \ - apt-dpkg-wrap apt-get install -y openjdk-11-jre-headless openjdk-11-jdk-headless && \ + apt-dpkg-wrap apt-get install -y unzip ca-certificates curl gnupg && \ + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \ + apt-dpkg-wrap apt-get update && \ + apt-dpkg-wrap apt-get install -y nodejs openjdk-17-jre-headless openjdk-17-jdk-headless && \ apt-cleanup diff --git a/docker-compose.yml b/docker-compose.yml index 59d352d0d4..78bfb82073 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.5' services: # Frontend web: - image: jitsi/web:${JITSI_IMAGE_VERSION:-stable-9220-1} + image: jitsi/web:${JITSI_IMAGE_VERSION:-stable-9364-1} restart: ${RESTART_POLICY:-unless-stopped} ports: - '${HTTP_PORT}:80' @@ -141,18 +141,26 @@ services: - VIDEOQUALITY_BITRATE_H264_LOW - VIDEOQUALITY_BITRATE_H264_STANDARD - VIDEOQUALITY_BITRATE_H264_HIGH + - VIDEOQUALITY_BITRATE_H264_FULL + - VIDEOQUALITY_BITRATE_H264_ULTRA - VIDEOQUALITY_BITRATE_H264_SS_HIGH - VIDEOQUALITY_BITRATE_VP8_LOW - VIDEOQUALITY_BITRATE_VP8_STANDARD - VIDEOQUALITY_BITRATE_VP8_HIGH + - VIDEOQUALITY_BITRATE_VP8_FULL + - VIDEOQUALITY_BITRATE_VP8_ULTRA - VIDEOQUALITY_BITRATE_VP8_SS_HIGH - VIDEOQUALITY_BITRATE_VP9_LOW - VIDEOQUALITY_BITRATE_VP9_STANDARD - VIDEOQUALITY_BITRATE_VP9_HIGH + - VIDEOQUALITY_BITRATE_VP9_FULL + - VIDEOQUALITY_BITRATE_VP9_ULTRA - VIDEOQUALITY_BITRATE_VP9_SS_HIGH - VIDEOQUALITY_BITRATE_AV1_LOW - VIDEOQUALITY_BITRATE_AV1_STANDARD - VIDEOQUALITY_BITRATE_AV1_HIGH + - VIDEOQUALITY_BITRATE_AV1_FULL + - VIDEOQUALITY_BITRATE_AV1_ULTRA - VIDEOQUALITY_BITRATE_AV1_SS_HIGH - VIDEOQUALITY_PREFERRED_CODEC - XMPP_AUTH_DOMAIN @@ -166,10 +174,12 @@ services: - WHITEBOARD_COLLAB_SERVER_PUBLIC_URL networks: meet.jitsi: + depends_on: + - jvb # XMPP server prosody: - image: jitsi/prosody:${JITSI_IMAGE_VERSION:-stable-9220-1} + image: jitsi/prosody:${JITSI_IMAGE_VERSION:-stable-9364-1} restart: ${RESTART_POLICY:-unless-stopped} expose: - '${XMPP_PORT:-5222}' @@ -293,6 +303,7 @@ services: - XMPP_RECORDER_DOMAIN - XMPP_PORT - XMPP_SERVER_S2S_PORT + - XMPP_SPEAKERSTATS_MODULES networks: meet.jitsi: aliases: @@ -300,7 +311,7 @@ services: # Focus component jicofo: - image: jitsi/jicofo:${JITSI_IMAGE_VERSION:-stable-9220-1} + image: jitsi/jicofo:${JITSI_IMAGE_VERSION:-stable-9364-1} restart: ${RESTART_POLICY:-unless-stopped} ports: - '127.0.0.1:${JICOFO_REST_PORT:-8888}:8888' @@ -383,7 +394,7 @@ services: # Video bridge jvb: - image: jitsi/jvb:${JITSI_IMAGE_VERSION:-stable-9220-1} + image: jitsi/jvb:${JITSI_IMAGE_VERSION:-stable-9364-1} restart: ${RESTART_POLICY:-unless-stopped} ports: - '${JVB_PORT:-10000}:${JVB_PORT:-10000}/udp' diff --git a/jibri.yml b/jibri.yml index f404d86dfb..feffec2dd7 100644 --- a/jibri.yml +++ b/jibri.yml @@ -2,7 +2,7 @@ version: '3.5' services: jibri: - image: jitsi/jibri:${JITSI_IMAGE_VERSION:-stable-9220-1} + image: jitsi/jibri:${JITSI_IMAGE_VERSION:-stable-9364-1} restart: ${RESTART_POLICY:-unless-stopped} volumes: - ${CONFIG}/jibri:/config:Z @@ -26,8 +26,10 @@ services: - DISPLAY=:0 - ENABLE_STATS_D - ICE_CONNECTION_TIMEOUT + - IGNORE_CERTIFICATE_ERRORS - JIBRI_WEBHOOK_SUBSCRIBERS - JIBRI_INSTANCE_ID + - JIBRI_ENABLE_PROMETHEUS - JIBRI_HTTP_API_EXTERNAL_PORT - JIBRI_HTTP_API_INTERNAL_PORT - JIBRI_RECORDING_RESOLUTION diff --git a/jibri/rootfs/defaults/jibri.conf b/jibri/rootfs/defaults/jibri.conf index 59d2aeac89..0bf9a82264 100644 --- a/jibri/rootfs/defaults/jibri.conf +++ b/jibri/rootfs/defaults/jibri.conf @@ -1,29 +1,13 @@ -{{ $JIBRI_XMPP_USER := .Env.JIBRI_XMPP_USER | default "jibri" -}} -{{ $JIBRI_RECORDER_USER := .Env.JIBRI_RECORDER_USER | default "recorder" -}} -{{ $JIBRI_USAGE_TIMEOUT := .Env.JIBRI_USAGE_TIMEOUT | default "0" -}} +{{ $ENABLE_PROMETHEUS := .Env.JIBRI_ENABLE_PROMETHEUS | default "false" | toBool -}} {{ $JIBRI_RECORDING_RESOLUTION := .Env.JIBRI_RECORDING_RESOLUTION | default "1280x720" -}} {{ $JIBRI_RECORDING_VIDEO_ENCODE_PRESET := .Env.JIBRI_RECORDING_VIDEO_ENCODE_PRESET | default "veryfast" -}} {{ $JIBRI_RECORDING_CONSTANT_RATE_FACTOR := .Env.JIBRI_RECORDING_CONSTANT_RATE_FACTOR | default 25 -}} {{ $JIBRI_RECORDING_FRAMERATE := .Env.JIBRI_RECORDING_FRAMERATE | default 30 -}} {{ $JIBRI_RECORDING_QUEUE_SIZE := .Env.JIBRI_RECORDING_QUEUE_SIZE | default 4096 -}} {{ $JIBRI_RECORDING_STREAMING_MAX_BITRATE := .Env.JIBRI_RECORDING_STREAMING_MAX_BITRATE | default 2976 -}} -{{ $JIBRI_BREWERY_MUC := .Env.JIBRI_BREWERY_MUC | default "jibribrewery" -}} {{ $JIBRI_SINGLE_USE_MODE := .Env.JIBRI_SINGLE_USE_MODE | default "false" -}} -{{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}} -{{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}} -{{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}} -{{ $XMPP_MUC_DOMAIN := .Env.XMPP_MUC_DOMAIN | default "muc.meet.jitsi" -}} -{{ $XMPP_MUC_DOMAIN_PREFIX := (split "." $XMPP_MUC_DOMAIN)._0 -}} -{{ $JIBRI_STRIP_DOMAIN_JID := .Env.JIBRI_STRIP_DOMAIN_JID | default $XMPP_MUC_DOMAIN_PREFIX -}} -{{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}} -{{ $XMPP_TRUST_ALL_CERTS := .Env.XMPP_TRUST_ALL_CERTS | default "true" | toBool -}} -{{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} -{{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}} -{{ $XMPP_SERVERS := splitList "," $XMPP_SERVER -}} {{ $STATSD_HOST := .Env.JIBRI_STATSD_HOST | default "localhost" -}} {{ $STATSD_PORT := .Env.JIBRI_STATSD_PORT | default "8125" -}} -{{/* assign env from context, preserve during range when . is re-assigned */}} -{{ $ENV := .Env -}} jibri { // A unique identifier for this Jibri @@ -45,67 +29,6 @@ jibri { {{ end -}} } {{ end -}} - xmpp { - // See example_xmpp_envs.conf for an example of what is expected here - environments = [ -{{ range $index, $element := $XMPP_SERVERS -}} -{{ $SERVER := splitn ":" 2 $element }} - { - // A user-friendly name for this environment - name = "{{ $ENV.XMPP_ENV_NAME }}-{{$index}}" - - // A list of XMPP server hosts to which we'll connect - xmpp-server-hosts = [ - "{{ $SERVER._0 }}" - ] - - // The base XMPP domain - xmpp-domain = "{{ $XMPP_DOMAIN }}" - - {{ if $ENV.PUBLIC_URL -}} - // An (optional) base url the Jibri will join if it is set - base-url = "{{ $ENV.PUBLIC_URL }}" - {{ end -}} - - // The MUC we'll join to announce our presence for - // recording and streaming services - control-muc { - domain = "{{ $XMPP_INTERNAL_MUC_DOMAIN }}" - room-name = "{{ $JIBRI_BREWERY_MUC }}" - nickname = "{{ $ENV.JIBRI_INSTANCE_ID }}" - } - - // The login information for the control MUC - control-login { - domain = "{{ $XMPP_AUTH_DOMAIN }}" - port = "{{ $SERVER._1 | default $XMPP_PORT }}" - username = "{{ $JIBRI_XMPP_USER }}" - password = "{{ $ENV.JIBRI_XMPP_PASSWORD }}" - } - - // The login information the selenium web client will use - call-login { - domain = "{{ $XMPP_RECORDER_DOMAIN }}" - username = "{{ $JIBRI_RECORDER_USER }}" - password = "{{ $ENV.JIBRI_RECORDER_PASSWORD }}" - } - - // The value we'll strip from the room JID domain to derive - // the call URL - strip-from-room-domain = "{{ $JIBRI_STRIP_DOMAIN_JID }}." - - // How long Jibri sessions will be allowed to last before - // they are stopped. A value of 0 allows them to go on - // indefinitely - usage-timeout = "{{ $JIBRI_USAGE_TIMEOUT }}" - - // Whether or not we'll automatically trust any cert on - // this XMPP domain - trust-all-xmpp-certs = {{ $XMPP_TRUST_ALL_CERTS }} - } -{{ end }} - ] - } } recording { recordings-directory = "{{ .Env.JIBRI_RECORDING_DIR | default "/config/recordings" }}" @@ -141,15 +64,27 @@ jibri { "{{ join "\",\"" (splitList "," .Env.CHROMIUM_FLAGS) }}" ] } + {{ else if .Env.IGNORE_CERTIFICATE_ERRORS -}} + chrome { + flags = [ + "--use-fake-ui-for-media-stream", + "--start-maximized", + "--kiosk", + "--enabled", + "--autoplay-policy=no-user-gesture-required", + "--ignore-certificate-errors" + ] + } {{ end -}} - {{ if .Env.ENABLE_STATS_D -}} stats { + {{- if .Env.ENABLE_STATS_D }} enable-stats-d = {{ .Env.ENABLE_STATS_D }} host = "{{ $STATSD_HOST }}" port = {{ $STATSD_PORT }} + {{- end }} + prometheus.enabled = {{ $ENABLE_PROMETHEUS }} } - {{ end -}} call-status-checks { {{ if .Env.NO_MEDIA_TIMEOUT -}} @@ -178,3 +113,5 @@ jibri { {{ end -}} } } + +include "xmpp.conf" diff --git a/jibri/rootfs/defaults/xmpp.conf b/jibri/rootfs/defaults/xmpp.conf new file mode 100644 index 0000000000..c8e58f35c2 --- /dev/null +++ b/jibri/rootfs/defaults/xmpp.conf @@ -0,0 +1,77 @@ +{{ $JIBRI_BREWERY_MUC := .Env.JIBRI_BREWERY_MUC | default "jibribrewery" -}} +{{ $XMPP_MUC_DOMAIN := .Env.XMPP_MUC_DOMAIN | default "muc.meet.jitsi" -}} +{{ $XMPP_MUC_DOMAIN_PREFIX := (split "." $XMPP_MUC_DOMAIN)._0 -}} +{{ $JIBRI_STRIP_DOMAIN_JID := .Env.JIBRI_STRIP_DOMAIN_JID | default $XMPP_MUC_DOMAIN_PREFIX -}} +{{ $JIBRI_RECORDER_USER := .Env.JIBRI_RECORDER_USER | default "recorder" -}} +{{ $JIBRI_USAGE_TIMEOUT := .Env.JIBRI_USAGE_TIMEOUT | default "0" -}} +{{ $JIBRI_XMPP_USER := .Env.JIBRI_XMPP_USER | default "jibri" -}} +{{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}} +{{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}} +{{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}} +{{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}} +{{ $XMPP_TRUST_ALL_CERTS := .Env.XMPP_TRUST_ALL_CERTS | default "true" | toBool -}} +{{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} +{{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}} +{{ $XMPP_SERVERS := splitList "," $XMPP_SERVER -}} +{{/* assign env from context, preserve during range when . is re-assigned */}} +{{ $ENV := .Env -}} + +jibri.api.xmpp.environments = [ + // See example_xmpp_envs.conf for an example of what is expected here +{{ range $index, $element := $XMPP_SERVERS -}} +{{ $SERVER := splitn ":" 2 $element }} + { + // A user-friendly name for this environment + name = "{{ $ENV.XMPP_ENV_NAME }}-{{$index}}" + + // A list of XMPP server hosts to which we'll connect + xmpp-server-hosts = [ + "{{ $SERVER._0 }}" + ] + + // The base XMPP domain + xmpp-domain = "{{ $XMPP_DOMAIN }}" + + {{ if $ENV.PUBLIC_URL -}} + // An (optional) base url the Jibri will join if it is set + base-url = "{{ $ENV.PUBLIC_URL }}" + {{ end -}} + + // The MUC we'll join to announce our presence for + // recording and streaming services + control-muc { + domain = "{{ $XMPP_INTERNAL_MUC_DOMAIN }}" + room-name = "{{ $JIBRI_BREWERY_MUC }}" + nickname = "{{ $ENV.JIBRI_INSTANCE_ID }}" + } + + // The login information for the control MUC + control-login { + domain = "{{ $XMPP_AUTH_DOMAIN }}" + port = "{{ $SERVER._1 | default $XMPP_PORT }}" + username = "{{ $JIBRI_XMPP_USER }}" + password = "{{ $ENV.JIBRI_XMPP_PASSWORD }}" + } + + // The login information the selenium web client will use + call-login { + domain = "{{ $XMPP_RECORDER_DOMAIN }}" + username = "{{ $JIBRI_RECORDER_USER }}" + password = "{{ $ENV.JIBRI_RECORDER_PASSWORD }}" + } + + // The value we'll strip from the room JID domain to derive + // the call URL + strip-from-room-domain = "{{ $JIBRI_STRIP_DOMAIN_JID }}." + + // How long Jibri sessions will be allowed to last before + // they are stopped. A value of 0 allows them to go on + // indefinitely + usage-timeout = "{{ $JIBRI_USAGE_TIMEOUT }}" + + // Whether or not we'll automatically trust any cert on + // this XMPP domain + trust-all-xmpp-certs = {{ $XMPP_TRUST_ALL_CERTS }} + } +{{ end }} +] diff --git a/jibri/rootfs/usr/bin/init_jitsi_jibri b/jibri/rootfs/usr/bin/init_jitsi_jibri index b6e967c99d..15a953df16 100755 --- a/jibri/rootfs/usr/bin/init_jitsi_jibri +++ b/jibri/rootfs/usr/bin/init_jitsi_jibri @@ -69,6 +69,7 @@ fi # always recreate configs tpl /defaults/jibri.conf > /etc/jitsi/jibri/jibri.conf +tpl /defaults/xmpp.conf > /etc/jitsi/jibri/xmpp.conf tpl /defaults/logging.properties > /etc/jitsi/jibri/logging.properties tpl /defaults/xorg-video-dummy.conf > /etc/jitsi/jibri/xorg-video-dummy.conf diff --git a/jibri/rootfs/usr/bin/install-chrome.sh b/jibri/rootfs/usr/bin/install-chrome.sh index b8fe139b56..9b89e1a4f0 100755 --- a/jibri/rootfs/usr/bin/install-chrome.sh +++ b/jibri/rootfs/usr/bin/install-chrome.sh @@ -33,7 +33,7 @@ else fi CHROMEDRIVER_ZIP="/tmp/chromedriver_linux64.zip" - curl -4Lso ${CHROMEDRIVER_ZIP} "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${CHROMEDRIVER_RELEASE}/linux64/chromedriver-linux64.zip" + curl -4Lso ${CHROMEDRIVER_ZIP} "https://storage.googleapis.com/chrome-for-testing-public/${CHROMEDRIVER_RELEASE}/linux64/chromedriver-linux64.zip" unzip ${CHROMEDRIVER_ZIP} -d /tmp/ mv /tmp/chromedriver-linux64/chromedriver /usr/bin/ chmod +x /usr/bin/chromedriver diff --git a/jibri/rootfs/usr/bin/service_wrapper_jibri b/jibri/rootfs/usr/bin/service_wrapper_jibri index c93e902b6a..2b2f3734a9 100755 --- a/jibri/rootfs/usr/bin/service_wrapper_jibri +++ b/jibri/rootfs/usr/bin/service_wrapper_jibri @@ -4,6 +4,8 @@ HOME=/home/jibri DAEMON=/opt/jitsi/jibri/launch.sh +CHROME_BIN_PATH="$(which google-chrome)" +[ $? -ne 0 ] && CHROME_BIN_PATH="$(which chromium)" # pre-warm google chrome before jibri launches to ensure fast chrome launch during recordings -exec /bin/bash -c "/usr/bin/google-chrome --timeout=1000 --headless about:blank" +exec /bin/bash -c "$CHROME_BIN_PATH --timeout=1000 --headless about:blank" exec /bin/bash -c "exec $DAEMON" diff --git a/jigasi.yml b/jigasi.yml index fb9cecfe2f..edfc780d4b 100644 --- a/jigasi.yml +++ b/jigasi.yml @@ -3,7 +3,7 @@ version: '3.5' services: # SIP gateway (audio) jigasi: - image: jitsi/jigasi:${JITSI_IMAGE_VERSION:-stable-9220-1} + image: jitsi/jigasi:${JITSI_IMAGE_VERSION:-stable-9364-1} restart: ${RESTART_POLICY:-unless-stopped} ports: - '${JIGASI_PORT_MIN:-20000}-${JIGASI_PORT_MAX:-20050}:${JIGASI_PORT_MIN:-20000}-${JIGASI_PORT_MAX:-20050}/udp' @@ -11,6 +11,16 @@ services: - ${CONFIG}/jigasi:/config:Z - ${CONFIG}/transcripts:/tmp/transcripts:Z environment: + - AUTOSCALER_SIDECAR_KEY_FILE + - AUTOSCALER_SIDECAR_KEY_ID + - AUTOSCALER_SIDECAR_GROUP_NAME + - AUTOSCALER_SIDECAR_HOST_ID + - AUTOSCALER_SIDECAR_INSTANCE_ID + - AUTOSCALER_SIDECAR_PORT + - AUTOSCALER_SIDECAR_REGION + - AUTOSCALER_SIDECAR_SHUTDOWN_POLLING_INTERVAL + - AUTOSCALER_SIDECAR_STATS_POLLING_INTERVAL + - AUTOSCALER_URL - ENABLE_AUTH - ENABLE_GUESTS - XMPP_AUTH_DOMAIN @@ -22,6 +32,7 @@ services: - XMPP_DOMAIN - PUBLIC_URL - JIGASI_DISABLE_SIP + - JIGASI_LOG_FILE - JIGASI_SIP_URI - JIGASI_SIP_PASSWORD - JIGASI_SIP_SERVER diff --git a/jigasi/Dockerfile b/jigasi/Dockerfile index 5aea861c9e..0a2ac1f396 100644 --- a/jigasi/Dockerfile +++ b/jigasi/Dockerfile @@ -11,7 +11,7 @@ LABEL org.opencontainers.image.documentation="https://jitsi.github.io/handbook/" ENV GOOGLE_APPLICATION_CREDENTIALS /config/key.json RUN apt-dpkg-wrap apt-get update && \ - apt-dpkg-wrap apt-get install -y jigasi jq && \ + apt-dpkg-wrap apt-get install -y jigasi jq jitsi-autoscaler-sidecar && \ apt-cleanup COPY rootfs/ / diff --git a/jigasi/rootfs/defaults/autoscaler-sidecar.config b/jigasi/rootfs/defaults/autoscaler-sidecar.config new file mode 100644 index 0000000000..ca68cff2c9 --- /dev/null +++ b/jigasi/rootfs/defaults/autoscaler-sidecar.config @@ -0,0 +1,18 @@ +{{ $SHUTDOWN_POLLING_INTERVAL := .Env.AUTOSCALER_SIDECAR_SHUTDOWN_POLLING_INTERVAL | default "60" -}} +{{ $STATS_POLLING_INTERVAL := .Env.AUTOSCALER_SIDECAR_STATS_POLLING_INTERVAL | default "30" -}} +{{ $JIGASI_STATS_PORT := .Env.JIGASI_STATS_PORT | default "8788" -}} +export SHUTDOWN_POLLING_INTERVAL={{ $SHUTDOWN_POLLING_INTERVAL }} +export STATS_POLLING_INTERVAL={{ $STATS_POLLING_INTERVAL }} +export PORT={{ .Env.AUTOSCALER_SIDECAR_PORT }} +export GRACEFUL_SHUTDOWN_SCRIPT="/usr/share/jigasi/graceful_shutdown.sh" +export TERMINATE_SCRIPT="/opt/jitsi/shutdown.sh" +export ENABLE_REPORT_STATS=true +export POLLING_URL="{{ .Env.AUTOSCALER_URL }}/sidecar/poll" +export STATUS_URL="{{ .Env.AUTOSCALER_URL }}/sidecar/status" +export STATS_RETRIEVE_URL="http://localhost:{{ $JIGASI_STATS_PORT }}/about/stats" +export STATS_REPORT_URL="{{ .Env.AUTOSCALER_URL }}/sidecar/stats" +export ASAP_SIGNING_KEY_FILE="{{ .Env.AUTOSCALER_SIDECAR_KEY_FILE }}" +export ASAP_JWT_KID="{{ .Env.AUTOSCALER_SIDECAR_KEY_ID }}" +export INSTANCE_TYPE="jigasi" +export INSTANCE_ID="{{ .Env.AUTOSCALER_SIDECAR_INSTANCE_ID }}" +export INSTANCE_METADATA='{"environment":"{{ .Env.XMPP_ENV_NAME }}","region":"{{ .Env.AUTOSCALER_SIDECAR_REGION }}","group":"{{ .Env.AUTOSCALER_SIDECAR_GROUP_NAME }}","name":"{{ .Env.JIGASI_INSTANCE_ID }}","version":"{{ .Env.JIGASI_VERSION }}","privateIp":"{{ .Env.LOCAL_ADDRESS }}","hostId":"{{ .Env.AUTOSCALER_SIDECAR_HOST_ID }}"}' diff --git a/jigasi/rootfs/defaults/sip-communicator.properties b/jigasi/rootfs/defaults/sip-communicator.properties index a13e49bc97..0f30c71abc 100644 --- a/jigasi/rootfs/defaults/sip-communicator.properties +++ b/jigasi/rootfs/defaults/sip-communicator.properties @@ -1,3 +1,4 @@ +{{ $ENABLE_TRANSCRIPTIONS := .Env.ENABLE_TRANSCRIPTIONS | default "0" | toBool -}} {{ $JIGASI_BREWERY_MUC := .Env.JIGASI_BREWERY_MUC | default "jigasibrewery" -}} {{ $JIGASI_XMPP_USER := .Env.JIGASI_XMPP_USER | default "jigasi" -}} {{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}} @@ -24,6 +25,7 @@ net.java.sip.communicator.packetlogging.PACKET_LOGGING_ENABLED=false # Control REST Shutdown org.jitsi.jigasi.ENABLE_REST_SHUTDOWN={{ $SHUTDOWN_REST_ENABLED }} +{{ if not $ENABLE_TRANSCRIPTIONS -}} # SIP account net.java.sip.communicator.impl.protocol.sip.acc1=acc1 {{ if .Env.JIGASI_SIP_SERVER }} @@ -77,6 +79,7 @@ net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.telephone-event/8000= net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.ulpfec/90000=0 net.java.sip.communicator.impl.protocol.sip.acc1.OVERRIDE_ENCODINGS=true net.java.sip.communicator.impl.protocol.sip.acc1.DOMAIN_BASE={{ $XMPP_DOMAIN }} +{{ end -}} # XMPP account used for control @@ -156,7 +159,7 @@ org.jitsi.jigasi.xmpp.acc.ALLOW_NON_SECURE=true # remote certificates always. net.java.sip.communicator.service.gui.ALWAYS_TRUST_MODE_ENABLED=true -{{ if .Env.ENABLE_TRANSCRIPTIONS | default "0" | toBool }} +{{ if $ENABLE_TRANSCRIPTIONS -}} # Transcription config org.jitsi.jigasi.ENABLE_TRANSCRIPTION=true org.jitsi.jigasi.transcription.ENABLE_TRANSLATION=true @@ -170,7 +173,7 @@ org.jitsi.jigasi.transcription.SAVE_TXT=true org.jitsi.jigasi.transcription.SEND_TXT={{ .Env.JIGASI_TRANSCRIBER_SEND_TXT | default "false"}} org.jitsi.jigasi.transcription.RECORD_AUDIO={{ .Env.JIGASI_TRANSCRIBER_RECORD_AUDIO | default "false"}} org.jitsi.jigasi.transcription.RECORD_AUDIO_FORMAT=wav -{{end}} +{{ end -}} {{ if .Env.JIGASI_SIP_DEFAULT_ROOM }} org.jitsi.jigasi.DEFAULT_JVB_ROOM_NAME={{ .Env.JIGASI_SIP_DEFAULT_ROOM }} diff --git a/jigasi/rootfs/etc/services.d/50-autoscaler-sidecar/run b/jigasi/rootfs/etc/services.d/50-autoscaler-sidecar/run new file mode 100644 index 0000000000..22f775088e --- /dev/null +++ b/jigasi/rootfs/etc/services.d/50-autoscaler-sidecar/run @@ -0,0 +1,10 @@ +#!/usr/bin/with-contenv bash + +if [[ -n "$AUTOSCALER_URL" ]] && [[ -f "/etc/jitsi/autoscaler-sidecar/config" ]]; then + DAEMON="/usr/bin/node /usr/share/jitsi-autoscaler-sidecar/app.js" + exec s6-setuidgid autoscaler-sidecar /bin/bash -c ". /etc/jitsi/autoscaler-sidecar/config && exec $DAEMON" +else + # if autoscaler-sidecar should not be started, + # prevent s6 from restarting this script again and again + s6-svc -O /var/run/s6/services/50-autoscaler-sidecar +fi diff --git a/jigasi/rootfs/usr/bin/init_jitsi_jigasi b/jigasi/rootfs/usr/bin/init_jitsi_jigasi index e618b0c2ae..f96b0c8d17 100755 --- a/jigasi/rootfs/usr/bin/init_jitsi_jigasi +++ b/jigasi/rootfs/usr/bin/init_jitsi_jigasi @@ -13,6 +13,38 @@ if [[ "$JIGASI_XMPP_PASSWORD" == "$OLD_JIGASI_XMPP_PASSWORD" ]]; then exit 1 fi +# set random jigasi nickname for the instance if is not set +[ -z "${JIGASI_INSTANCE_ID}" ] && export JIGASI_INSTANCE_ID="jigasi-$(date +%N)" + +# check for AUTOSCALER_URL, AUTOSCALER_SIDECAR_KEY_FILE and AUTOSCALER_SIDECAR_KEY_ID as indicator that sidecar should be enabled +if [ -n "$AUTOSCALER_URL" ]; then + if [ -z "$AUTOSCALER_SIDECAR_KEY_FILE" ]; then + export AUTOSCALER_SIDECAR_KEY_FILE="/etc/jitsi/autoscaler-sidecar/asap.pem" + fi + if [ -z "$AUTOSCALER_SIDECAR_KEY_ID" ]; then + # assume key id is equal to the base real path of the key file minus .pem + export AUTOSCALER_SIDECAR_KEY_ID="$(basename "$(realpath "$AUTOSCALER_SIDECAR_KEY_FILE")" | tr -d '.pem')" + fi + + if [ -f "$AUTOSCALER_SIDECAR_KEY_FILE" ]; then + echo "AUTOSCALER_URL found, enabling autoscaler sidecar" + + export JIGASI_VERSION="$(dpkg -s jigasi | grep Version | awk '{print $2}' | sed 's/..$//')" + + [ -z "$AUTOSCALER_SIDECAR_PORT" ] && export AUTOSCALER_SIDECAR_PORT="6000" + [ -z "$AUTOSCALER_SIDECAR_INSTANCE_ID" ] && export AUTOSCALER_SIDECAR_INSTANCE_ID="$JIGASI_INSTANCE_ID" + [ -z "$AUTOSCALER_SIDECAR_REGION" ] && export AUTOSCALER_SIDECAR_REGION="docker" + [ -z "$AUTOSCALER_SIDECAR_GROUP_NAME" ] && export AUTOSCALER_SIDECAR_GROUP_NAME="docker-jigasi" + + mkdir -p /etc/jitsi/autoscaler-sidecar + tpl /defaults/autoscaler-sidecar.config > /etc/jitsi/autoscaler-sidecar/config + else + echo "No key file at $AUTOSCALER_SIDECAR_KEY_FILE, leaving autoscaler sidecar disabled" + fi +else + echo "No AUTOSCALER_URL defined, leaving autoscaler sidecar disabled" +fi + tpl /defaults/logging.properties > /config/logging.properties tpl /defaults/sip-communicator.properties > /config/sip-communicator.properties diff --git a/jigasi/rootfs/usr/bin/service_wrapper_jigasi b/jigasi/rootfs/usr/bin/service_wrapper_jigasi index 61b7277c6a..4b246f5ff1 100755 --- a/jigasi/rootfs/usr/bin/service_wrapper_jigasi +++ b/jigasi/rootfs/usr/bin/service_wrapper_jigasi @@ -6,4 +6,7 @@ DAEMON=/usr/share/jigasi/jigasi.sh DAEMON_OPTS="--nocomponent=true --configdir=/ --configdirname=config --min-port=${JIGASI_PORT_MIN:-20000} --max-port=${JIGASI_PORT_MAX:-20050}" # exec s6-setuidgid jigasi -exec /bin/bash -c "JAVA_SYS_PROPS=\"$JAVA_SYS_PROPS\" exec $DAEMON $DAEMON_OPTS" +JIGASI_CMD="JAVA_SYS_PROPS=\"$JAVA_SYS_PROPS\" exec $DAEMON $DAEMON_OPTS" +[ -n "$JIGASI_LOG_FILE" ] && JIGASI_CMD="$JIGASI_CMD 2>&1 | tee $JIGASI_LOG_FILE" + +exec /bin/bash -c "$JIGASI_CMD" diff --git a/jvb/Dockerfile b/jvb/Dockerfile index edf0cb6f1b..d4fdfb4a8d 100644 --- a/jvb/Dockerfile +++ b/jvb/Dockerfile @@ -9,7 +9,7 @@ LABEL org.opencontainers.image.source="https://github.com/jitsi/docker-jitsi-mee LABEL org.opencontainers.image.documentation="https://jitsi.github.io/handbook/" RUN apt-dpkg-wrap apt-get update && \ - apt-dpkg-wrap apt-get install -y jitsi-videobridge2 jitsi-autoscaler-sidecar jq curl iproute2 dnsutils && \ + apt-dpkg-wrap apt-get install -y jitsi-videobridge2 jitsi-autoscaler-sidecar jq curl iproute2 dnsutils libpcap0.8 && \ apt-cleanup COPY rootfs/ / diff --git a/prosody/rootfs/defaults/conf.d/brewery.cfg.lua b/prosody/rootfs/defaults/conf.d/brewery.cfg.lua index d225cb8ec0..a139f98d6f 100644 --- a/prosody/rootfs/defaults/conf.d/brewery.cfg.lua +++ b/prosody/rootfs/defaults/conf.d/brewery.cfg.lua @@ -13,9 +13,6 @@ admins = { plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom" } VirtualHost "{{ $JVB_XMPP_AUTH_DOMAIN }}" - modules_enabled = { - "ping"; - } authentication = "internal_hashed" ssl = { key = "/config/certs/{{ $JVB_XMPP_AUTH_DOMAIN }}.key"; @@ -24,7 +21,6 @@ VirtualHost "{{ $JVB_XMPP_AUTH_DOMAIN }}" Component "{{ $JVB_XMPP_INTERNAL_MUC_DOMAIN }}" "muc" modules_enabled = { - "ping", "muc_hide_all"; "muc_filter_access"; } diff --git a/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua b/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua index 1688c9baef..7f8e4fbcb4 100644 --- a/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua +++ b/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua @@ -130,7 +130,6 @@ smacks_max_old_sessions = 1; {{ if $ENABLE_JAAS_COMPONENTS }} VirtualHost "jigasi.meet.jitsi" modules_enabled = { - "ping"; "bosh"; "muc_password_check"; } @@ -204,7 +203,6 @@ VirtualHost "{{ $XMPP_DOMAIN }}" "websocket"; "smacks"; -- XEP-0198: Stream Management {{ end }} - "ping"; "speakerstats"; "conference_duration"; "room_metadata"; @@ -279,7 +277,6 @@ VirtualHost "{{ $XMPP_DOMAIN }}" VirtualHost "{{ $XMPP_GUEST_DOMAIN }}" authentication = "{{ $GUEST_AUTH_TYPE }}" modules_enabled = { - "ping"; {{ if $ENABLE_XMPP_WEBSOCKET }} "smacks"; -- XEP-0198: Stream Management {{ end }} @@ -299,14 +296,12 @@ VirtualHost "{{ $XMPP_AUTH_DOMAIN }}" } modules_enabled = { "limits_exception"; - "ping"; } authentication = "internal_hashed" {{ if $ENABLE_RECORDING }} VirtualHost "{{ $XMPP_RECORDER_DOMAIN }}" modules_enabled = { - "ping"; "smacks"; } authentication = "internal_hashed" @@ -315,7 +310,6 @@ VirtualHost "{{ $XMPP_RECORDER_DOMAIN }}" Component "{{ $XMPP_INTERNAL_MUC_DOMAIN }}" "muc" storage = "memory" modules_enabled = { - "ping"; {{ if .Env.XMPP_INTERNAL_MUC_MODULES -}} "{{ join "\";\n\"" (splitList "," .Env.XMPP_INTERNAL_MUC_MODULES) }}"; {{ end -}} @@ -325,6 +319,8 @@ Component "{{ $XMPP_INTERNAL_MUC_DOMAIN }}" "muc" muc_room_locking = false muc_room_default_public_jids = true muc_room_cache_size = 1000 + muc_tombstones = false + muc_room_allow_persistent = false Component "{{ $XMPP_MUC_DOMAIN }}" "muc" restrict_room_creation = true @@ -381,9 +377,8 @@ Component "{{ $XMPP_MUC_DOMAIN }}" "muc" {{ end }} }; - rate_limit_whitelist_jids = { - "{{ $JIBRI_RECORDER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}", - "{{ $JIGASI_TRANSCRIBER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}" + rate_limit_whitelist_hosts = { + "{{ $XMPP_RECORDER_DOMAIN }}"; } {{ end -}} @@ -397,11 +392,11 @@ Component "{{ $XMPP_MUC_DOMAIN }}" "muc" {{ join "\n " (splitList "," .Env.XMPP_MUC_CONFIGURATION) }} {{ end -}} {{ if .Env.MAX_PARTICIPANTS }} - muc_access_whitelist = { "focus@{{ .Env.XMPP_AUTH_DOMAIN }}" } + muc_access_whitelist = { "focus@{{ $XMPP_AUTH_DOMAIN }}" } muc_max_occupants = "{{ .Env.MAX_PARTICIPANTS }}" {{ end }} muc_password_whitelist = { - "focus@{{ .Env.XMPP_AUTH_DOMAIN }}"; + "focus@{{ $XMPP_AUTH_DOMAIN }}"; {{- if $ENABLE_RECORDING }} "{{ $JIBRI_RECORDER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}"; {{- end }} @@ -409,12 +404,19 @@ Component "{{ $XMPP_MUC_DOMAIN }}" "muc" "{{ $JIGASI_TRANSCRIBER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}"; {{- end }} } + muc_tombstones = false + muc_room_allow_persistent = false Component "focus.{{ $XMPP_DOMAIN }}" "client_proxy" target_address = "focus@{{ $XMPP_AUTH_DOMAIN }}" Component "speakerstats.{{ $XMPP_DOMAIN }}" "speakerstats_component" muc_component = "{{ $XMPP_MUC_DOMAIN }}" + {{- if .Env.XMPP_SPEAKERSTATS_MODULES }} + modules_enabled = { + "{{ join "\";\n \"" (splitList "," .Env.XMPP_SPEAKERSTATS_MODULES) }}"; + } + {{- end }} Component "conferenceduration.{{ $XMPP_DOMAIN }}" "conference_duration_component" muc_component = "{{ $XMPP_MUC_DOMAIN }}" @@ -433,6 +435,7 @@ Component "avmoderation.{{ $XMPP_DOMAIN }}" "av_moderation_component" Component "lobby.{{ $XMPP_DOMAIN }}" "muc" storage = "memory" restrict_room_creation = true + muc_tombstones = false muc_room_allow_persistent = false muc_room_cache_size = 10000 muc_room_locking = false @@ -455,6 +458,7 @@ Component "breakout.{{ $XMPP_DOMAIN }}" "muc" muc_room_cache_size = 10000 muc_room_locking = false muc_room_default_public_jids = true + muc_tombstones = false muc_room_allow_persistent = false modules_enabled = { "muc_meeting_id"; @@ -478,4 +482,5 @@ Component "metadata.{{ $XMPP_DOMAIN }}" "room_metadata_component" {{ if $ENABLE_VISITORS }} Component "visitors.{{ $XMPP_DOMAIN }}" "visitors_component" auto_allow_visitor_promotion = true + always_visitors_enabled = true {{ end }} diff --git a/prosody/rootfs/defaults/conf.d/visitors.cfg.lua b/prosody/rootfs/defaults/conf.d/visitors.cfg.lua index 51520ebe6a..a082b5bc02 100644 --- a/prosody/rootfs/defaults/conf.d/visitors.cfg.lua +++ b/prosody/rootfs/defaults/conf.d/visitors.cfg.lua @@ -112,7 +112,6 @@ VirtualHost 'v{{ $VISITOR_INDEX }}.{{ $VISITORS_XMPP_DOMAIN }}' } modules_enabled = { 'bosh'; - 'ping'; "external_services"; {{ if $ENABLE_XMPP_WEBSOCKET -}} "websocket"; @@ -131,10 +130,9 @@ VirtualHost 'v{{ $VISITOR_INDEX }}.{{ $VISITORS_XMPP_DOMAIN }}' {{ join "\n " (splitList "," .Env.XMPP_CONFIGURATION) }} {{- end }} -VirtualHost '{{ $XMPP_AUTH_DOMAIN}}' +VirtualHost '{{ $XMPP_AUTH_DOMAIN }}' modules_enabled = { 'limits_exception'; - 'ping'; } authentication = 'internal_hashed' @@ -172,6 +170,8 @@ Component '{{ $VISITORS_MUC_PREFIX }}.v{{ $VISITOR_INDEX }}.{{ $VISITORS_XMPP_DO muc_access_whitelist = { "{{ $XMPP_DOMAIN }}"; } + muc_tombstones = false + muc_room_allow_persistent = false {{ if $ENABLE_RATE_LIMITS -}} -- Max allowed join/login rate in events per second. @@ -188,10 +188,6 @@ Component '{{ $VISITORS_MUC_PREFIX }}.v{{ $VISITOR_INDEX }}.{{ $VISITORS_XMPP_DO {{ end -}} }; - rate_limit_whitelist_jids = { - "{{ $JIBRI_RECORDER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}", - "{{ $JIGASI_TRANSCRIBER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}" - } {{ end -}} -- The size of the cache that saves state for IP addresses diff --git a/prosody/rootfs/defaults/prosody.cfg.lua b/prosody/rootfs/defaults/prosody.cfg.lua index 8864b8bdae..ee67f34efa 100644 --- a/prosody/rootfs/defaults/prosody.cfg.lua +++ b/prosody/rootfs/defaults/prosody.cfg.lua @@ -4,7 +4,7 @@ {{ $ENABLE_VISITORS := .Env.ENABLE_VISITORS | default "0" | toBool -}} {{ $ENABLE_S2S := or $ENABLE_VISITORS ( .Env.PROSODY_ENABLE_S2S | default "0" | toBool ) }} {{ $ENABLE_IPV6 := .Env.ENABLE_IPV6 | default "true" | toBool -}} -{{ $GC_TYPE := .Env.GC_TYPE | default "incremental" -}} +{{ $GC_TYPE := .Env.GC_TYPE | default "generational" -}} {{ $GC_INC_TH := .Env.GC_INC_TH | default 150 -}} {{ $GC_INC_SPEED := .Env.GC_INC_SPEED | default 250 -}} {{ $GC_INC_STEP_SIZE := .Env.GC_INC_STEP_SIZE | default 13 -}} @@ -131,7 +131,8 @@ firewall_scripts = { -- These modules are auto-loaded, but should you want -- to disable them then uncomment them here: modules_disabled = { - -- "offline"; -- Store offline messages + "offline"; -- Store offline messages + "register"; -- "c2s"; -- Handle client connections {{ if not $ENABLE_S2S -}} diff --git a/web/rootfs/defaults/settings-config.js b/web/rootfs/defaults/settings-config.js index eda44c0054..4a5fbb133b 100644 --- a/web/rootfs/defaults/settings-config.js +++ b/web/rootfs/defaults/settings-config.js @@ -408,48 +408,108 @@ config.videoQuality = {}; config.videoQuality.preferredCodec = '{{ .Env.VIDEOQUALITY_PREFERRED_CODEC }}'; {{ end -}} -{{ if and .Env.VIDEOQUALITY_BITRATE_AV1_LOW .Env.VIDEOQUALITY_BITRATE_AV1_STANDARD .Env.VIDEOQUALITY_BITRATE_AV1_HIGH .Env.VIDEOQUALITY_BITRATE_AV1_SS_HIGH -}} -config.videoQuality.av1 = { - maxBitratesVideo: { - low: {{ .Env.VIDEOQUALITY_BITRATE_AV1_LOW }}, - standard: {{ .Env.VIDEOQUALITY_BITRATE_AV1_STANDARD }}, - high: {{ .Env.VIDEOQUALITY_BITRATE_AV1_HIG }}, - ssHigh: {{ .Env.VIDEOQUALITY_BITRATE_AV1_SS_HIGH }} - } -} +config.videoQuality.av1 = {}; + +{{ if .Env.VIDEOQUALITY_BITRATE_AV1_LOW }} +config.videoQuality.av1.low = {{ .Env.VIDEOQUALITY_BITRATE_AV1_LOW }}; {{ end -}} -{{ if and .Env.VIDEOQUALITY_BITRATE_H264_LOW .Env.VIDEOQUALITY_BITRATE_H264_STANDARD .Env.VIDEOQUALITY_BITRATE_H264_HIGH .Env.VIDEOQUALITY_BITRATE_H264_SS_HIGH -}} -config.videoQuality.h264 = { - maxBitratesVideo: { - low: {{ .Env.VIDEOQUALITY_BITRATE_H264_LOW }}, - standard: {{ .Env.VIDEOQUALITY_BITRATE_H264_STANDARD }}, - high: {{ .Env.VIDEOQUALITY_BITRATE_H264_HIGH }}, - ssHigh: {{ .Env.VIDEOQUALITY_BITRATE_H264_SS_HIGH }} - } -} +{{ if .Env.VIDEOQUALITY_BITRATE_AV1_STANDARD }} +config.videoQuality.av1.standard = {{ .Env.VIDEOQUALITY_BITRATE_AV1_STANDARD }}; {{ end -}} -{{ if and .Env.VIDEOQUALITY_BITRATE_VP8_LOW .Env.VIDEOQUALITY_BITRATE_VP8_STANDARD .Env.VIDEOQUALITY_BITRATE_VP8_HIGH .Env.VIDEOQUALITY_BITRATE_VP8_SS_HIGH -}} -config.videoQuality.vp8 = { - maxBitratesVideo: { - low: {{ .Env.VIDEOQUALITY_BITRATE_VP8_LOW }}, - standard: {{ .Env.VIDEOQUALITY_BITRATE_VP8_STANDARD }}, - high: {{ .Env.VIDEOQUALITY_BITRATE_VP8_HIGH }}, - ssHigh: {{ .Env.VIDEOQUALITY_BITRATE_VP8_SS_HIGH }} - } -} +{{ if .Env.VIDEOQUALITY_BITRATE_AV1_HIGH }} +config.videoQuality.av1.high = {{ .Env.VIDEOQUALITY_BITRATE_AV1_HIGH }}; {{ end -}} -{{ if and .Env.VIDEOQUALITY_BITRATE_VP9_LOW .Env.VIDEOQUALITY_BITRATE_VP9_STANDARD .Env.VIDEOQUALITY_BITRATE_VP9_HIGH .Env.VIDEOQUALITY_BITRATE_VP9_SS_HIGH -}} -config.videoQuality.vp9 = { - maxBitratesVideo: { - low: {{ .Env.VIDEOQUALITY_BITRATE_VP9_LOW }}, - standard: {{ .Env.VIDEOQUALITY_BITRATE_VP9_STANDARD }}, - high: {{ .Env.VIDEOQUALITY_BITRATE_VP9_HIGH }}, - ssHigh: {{ .Env.VIDEOQUALITY_BITRATE_VP9_SS_HIGH }} - } -} +{{ if .Env.VIDEOQUALITY_BITRATE_AV1_FULL }} +config.videoQuality.av1.fullHd = {{ .Env.VIDEOQUALITY_BITRATE_AV1_FULL }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_AV1_ULTRA }} +config.videoQuality.av1.ultraHd = {{ .Env.VIDEOQUALITY_BITRATE_AV1_ULTRA }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_AV1_SS_HIGH }} +config.videoQuality.av1.ssHigh = {{ .Env.VIDEOQUALITY_BITRATE_AV1_SS_HIGH }}; +{{ end -}} + +config.videoQuality.h264 = {}; + +{{ if .Env.VIDEOQUALITY_BITRATE_H264_LOW }} +config.videoQuality.h264.low = {{ .Env.VIDEOQUALITY_BITRATE_H264_LOW }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_H264_STANDARD }} +config.videoQuality.h264.standard = {{ .Env.VIDEOQUALITY_BITRATE_H264_STANDARD }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_H264_HIGH }} +config.videoQuality.h264.high = {{ .Env.VIDEOQUALITY_BITRATE_H264_HIGH }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_H264_FULL }} +config.videoQuality.h264.fullHd = {{ .Env.VIDEOQUALITY_BITRATE_H264_FULL }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_H264_ULTRA }} +config.videoQuality.h264.ultraHd = {{ .Env.VIDEOQUALITY_BITRATE_H264_ULTRA }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_H264_SS_HIGH }} +config.videoQuality.h264.ssHigh = {{ .Env.VIDEOQUALITY_BITRATE_H264_SS_HIGH }}; +{{ end -}} + +config.videoQuality.vp8 = {}; + +{{ if .Env.VIDEOQUALITY_BITRATE_VP8_LOW }} +config.videoQuality.vp8.low = {{ .Env.VIDEOQUALITY_BITRATE_VP8_LOW }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_VP8_STANDARD }} +config.videoQuality.vp8.standard = {{ .Env.VIDEOQUALITY_BITRATE_VP8_STANDARD }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_VP8_HIGH }} +config.videoQuality.vp8.high = {{ .Env.VIDEOQUALITY_BITRATE_VP8_HIGH }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_VP8_FULL }} +config.videoQuality.vp8.fullHd = {{ .Env.VIDEOQUALITY_BITRATE_VP8_FULL }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_VP8_ULTRA }} +config.videoQuality.vp8.ultraHd = {{ .Env.VIDEOQUALITY_BITRATE_VP8_ULTRA }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_VP8_SS_HIGH }} +config.videoQuality.vp8.ssHigh = {{ .Env.VIDEOQUALITY_BITRATE_VP8_SS_HIGH }}; +{{ end -}} + +config.videoQuality.vp9 = {}; + +{{ if .Env.VIDEOQUALITY_BITRATE_VP9_LOW }} +config.videoQuality.vp9.low = {{ .Env.VIDEOQUALITY_BITRATE_VP9_LOW }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_VP9_STANDARD }} +config.videoQuality.vp9.standard = {{ .Env.VIDEOQUALITY_BITRATE_VP9_STANDARD }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_VP9_HIGH }} +config.videoQuality.vp9.high = {{ .Env.VIDEOQUALITY_BITRATE_VP9_HIGH }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_VP9_FULL }} +config.videoQuality.vp9.fullHd = {{ .Env.VIDEOQUALITY_BITRATE_VP9_FULL }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_VP9_ULTRA }} +config.videoQuality.vp9.ultraHd = {{ .Env.VIDEOQUALITY_BITRATE_VP9_ULTRA }}; +{{ end -}} + +{{ if .Env.VIDEOQUALITY_BITRATE_VP9_SS_HIGH }} +config.videoQuality.vp9.ssHigh = {{ .Env.VIDEOQUALITY_BITRATE_VP9_SS_HIGH }}; {{ end -}} // Reactions diff --git a/web/rootfs/defaults/system-config.js b/web/rootfs/defaults/system-config.js index b680acf40a..a4a5ed5524 100644 --- a/web/rootfs/defaults/system-config.js +++ b/web/rootfs/defaults/system-config.js @@ -22,7 +22,7 @@ config.focusUserJid = 'focus@{{$XMPP_AUTH_DOMAIN}}'; {{ if $ENABLE_SUBDOMAINS -}} var subdir = ''; -var subdomain = ""; +var subdomain = ''; if (subdir.startsWith('