docker icon indicating copy to clipboard operation
docker copied to clipboard

feat(bbb-docker): Add enable switches for **Collabora** and **Coturn** + make Collabora URL configurable

Open kevinveenbirkenbach opened this issue 3 months ago • 0 comments

Summary

This MR introduces opt-in/opt-out switches for bundling Collabora and Coturn inside the BigBlueButton Docker stack. It also makes the Collabora endpoint configurable via COLLABORA_URL. With these changes, operators can either run the bundled services or disable them to use centralized services provided elsewhere in the infrastructure (e.g., via Infinito.Nexus roles).

  • New env flags: ENABLE_COLLABORA, ENABLE_COTURN
  • New env var: COLLABORA_URL (used by conversion scripts)
  • Conditional depends_on and service blocks in the Compose template
  • Updated sample.env and scripts/generate-compose

These switches are required to integrate with centralized deployments managed by Infinito.Nexus:


What changed

Compose template (docker-compose.tmpl.yml)

  • bbb-web.depends_on: gated collabora with {{ if isTrue .Env.ENABLE_COLLABORA }} ... {{ end }}

  • bbb-web.environment: added COLLABORA_URL with sensible default

  • etherpad.depends_on: conditionally depends on collabora

  • New conditional blocks:

    • Wrap entire collabora service with {{ if isTrue .Env.ENABLE_COLLABORA }} ... {{ end }}
    • Wrap entire coturn service with {{ if isTrue .Env.ENABLE_COTURN }} ... {{ end }}

Conversion scripts

  • mod/bbb-web/office-convert.sh: use $COLLABORA_URL/convert-to/... instead of hardcoded https://collabora:9980/cool/...
  • mod/etherpad/etherpad-export.sh: same change to use $COLLABORA_URL

Environment & generation

  • sample.env: added:

    ENABLE_COLLABORA=true
    COLLABORA_URL=https://collabora:9980/cool
    ENABLE_COTURN=true
    
  • scripts/generate-compose: export new flags to the templater:

    -e ENABLE_COTURN=${ENABLE_COTURN:-true} \
    -e ENABLE_COLLABORA=${ENABLE_COLLABORA:-true} \
    

Why

  • Let operators disable embedded services and consume centralized, shared services (e.g., a site-wide Collabora/Coturn), reducing duplication and simplifying maintenance.
  • Avoid hardcoded Collabora URL to support different network topologies (internal hostname, external FQDN, reverse proxy path, TLS termination variants).

How to use

  • Bundled services (default):

    ENABLE_COLLABORA=true
    COLLABORA_URL=https://collabora:9980/cool
    ENABLE_COTURN=true
    
  • External/central services:

    ENABLE_COLLABORA=false
    COLLABORA_URL=https://collabora.example.org/cool
    ENABLE_COTURN=false
    

    Ensure your external Coturn and Collabora endpoints are reachable and correctly configured.


Backwards compatibility

  • Defaults keep previous behavior: both services remain enabled and the in-stack Collabora URL is preserved.
  • Scripts now honor COLLABORA_URL. If unset, Compose injects the previous default (https://collabora:9980/cool).

Testing

  1. Default path (embedded)

    • ENABLE_COLLABORA=true, ENABLE_COTURN=true
    • Run ./scripts/generate-compose and docker compose up -d
    • Verify services include collabora and coturn
    • Upload ODT/PPT/PDF → conversion works
    • TURN/STUN connectivity works in meetings
  2. Centralized Collabora

    • ENABLE_COLLABORA=false, set COLLABORA_URL to external
    • Regenerate and start
    • Confirm no collabora service in Compose
    • Conversions call external $COLLABORA_URL
  3. Centralized Coturn

    • ENABLE_COTURN=false
    • Regenerate and start
    • Confirm no coturn service in Compose
    • Verify BBB uses external TURN (env/config as per your infra)

Security considerations

  • When pointing COLLABORA_URL to an external service, ensure TLS and trust boundaries are appropriate.
  • Disabling embedded Coturn requires your external TURN to be correctly authenticated and reachable (shared secret or long-term credentials).

Checklist

  • [x] Conditional depends_on for bbb-web and etherpad
  • [x] Collabora & Coturn services gated by env flags
  • [x] Conversion scripts read COLLABORA_URL
  • [x] sample.env extended with new vars
  • [x] scripts/generate-compose passes flags to templater
  • [x] Verified defaults preserve existing behavior

Diff (reference)

Included in the MR: changes to docker-compose.tmpl.yml, mod/bbb-web/office-convert.sh, mod/etherpad/etherpad-export.sh, sample.env, and scripts/generate-compose as provided in the request.

kevinveenbirkenbach avatar Sep 27 '25 00:09 kevinveenbirkenbach