From 5e7880fe19c3984a7704ec45da9b1c95bef95250 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 27 Sep 2025 00:36:27 +0200 Subject: [PATCH 1/2] Introduced variables to deactivate Collabora and Coturn container to be able to use external services --- docker-compose.tmpl.yml | 10 ++++++++-- sample.env | 13 +++++++++++++ scripts/generate-compose | 2 ++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/docker-compose.tmpl.yml b/docker-compose.tmpl.yml index 7f8acd19..a411f840 100644 --- a/docker-compose.tmpl.yml +++ b/docker-compose.tmpl.yml @@ -35,7 +35,9 @@ services: - redis - etherpad - bbb-pads + {{ if isTrue .Env.ENABLE_COLLABORA }} - collabora + {{ end }} healthcheck: test: wget --no-proxy --no-verbose --tries=1 --spider http://10.7.7.2:8090/bigbluebutton/api || exit 1 start_period: 2m @@ -150,7 +152,9 @@ services: restart: unless-stopped depends_on: - redis + {{ if isTrue .Env.ENABLE_COLLABORA }} - collabora + {{ end }} environment: ETHERPAD_API_KEY: ${ETHERPAD_API_KEY} networks: @@ -366,6 +370,7 @@ services: - ./.cache/go-build:/.cache/go-build:rw {{ end }} +{{ if isTrue .Env.ENABLE_COLLABORA }} collabora: image: collabora/code:latest restart: unless-stopped @@ -377,7 +382,7 @@ services: # disable logging (way to verbose) logging: driver: none - +{{ end }} periodic: build: mod/periodic @@ -482,6 +487,7 @@ services: network_mode: host {{end}} +{{ if isTrue .Env.ENABLE_COTURN }} # coturn coturn: image: coturn/coturn:4.6-alpine @@ -496,7 +502,7 @@ services: volumes: - ./mod/coturn/turnserver.conf:/etc/coturn/turnserver.conf network_mode: host - +{{end}} {{ if isTrue .Env.ENABLE_GREENLIGHT }} # greenlight diff --git a/sample.env b/sample.env index 99b654ec..f717d9f0 100644 --- a/sample.env +++ b/sample.env @@ -12,6 +12,19 @@ LETSENCRYPT_EMAIL=test@example.net # https://docs.bigbluebutton.org/greenlight/gl-overview.html ENABLE_GREENLIGHT=true + +# Collabora +# Enable Collabora service +# Deactivate if you use an external coturn server +# https://www.collaboraonline.com/ +ENABLE_COLLABORA=true + +# Coturn +# Enable Coturn service +# Deactivate if you use an external coturn server +# https://github.com/coturn/coturn +ENABLE_COTURN=true + # Enable Webhooks # used by some integrations #ENABLE_WEBHOOKS=true diff --git a/scripts/generate-compose b/scripts/generate-compose index 54617dcf..0fd92457 100755 --- a/scripts/generate-compose +++ b/scripts/generate-compose @@ -59,6 +59,8 @@ docker run \ -e ENABLE_HTTPS_PROXY=${ENABLE_HTTPS_PROXY:-false} \ -e ENABLE_WEBHOOKS=${ENABLE_WEBHOOKS:-false} \ -e ENABLE_GREENLIGHT=${ENABLE_GREENLIGHT:-false} \ + -e ENABLE_COTURN=${ENABLE_COTURN:-true} \ + -e ENABLE_COLLABORA=${ENABLE_COLLABORA:-true} \ -e ENABLE_PROMETHEUS_EXPORTER=${ENABLE_PROMETHEUS_EXPORTER:-false} \ -e ENABLE_PROMETHEUS_EXPORTER_OPTIMIZATION=${ENABLE_PROMETHEUS_EXPORTER_OPTIMIZATION:-false} \ jwilder/dockerize -template /docker-compose.tmpl.yml \ From b8de2a38e2895085727ec1f46d69137939d54987 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 27 Sep 2025 01:00:30 +0200 Subject: [PATCH 2/2] Make Collabora service URL configurable via COLLABORA_URL env variable across docker-compose, office-convert.sh, etherpad-export.sh, and sample.env --- docker-compose.tmpl.yml | 2 ++ mod/bbb-web/office-convert.sh | 2 +- mod/etherpad/etherpad-export.sh | 2 +- sample.env | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docker-compose.tmpl.yml b/docker-compose.tmpl.yml index a411f840..b60038c8 100644 --- a/docker-compose.tmpl.yml +++ b/docker-compose.tmpl.yml @@ -54,6 +54,7 @@ services: TURN_EXT_SERVER: ${TURN_EXT_SERVER:-} TURN_EXT_SECRET: ${TURN_EXT_SECRET:-} ENABLE_LEARNING_DASHBOARD: ${ENABLE_LEARNING_DASHBOARD:-true} + COLLABORA_URL: ${COLLABORA_URL:-https://collabora:9980/cool} volumes: - ./data/bigbluebutton:/var/bigbluebutton - ./data/freeswitch-meetings:/var/freeswitch/meetings @@ -157,6 +158,7 @@ services: {{ end }} environment: ETHERPAD_API_KEY: ${ETHERPAD_API_KEY} + COLLABORA_URL: ${COLLABORA_URL:-https://collabora:9980/cool} networks: bbb-net: ipv4_address: 10.7.7.4 diff --git a/mod/bbb-web/office-convert.sh b/mod/bbb-web/office-convert.sh index f896bfc5..ee88b34f 100755 --- a/mod/bbb-web/office-convert.sh +++ b/mod/bbb-web/office-convert.sh @@ -31,6 +31,6 @@ timeoutSecs="${timeoutSecs:0:3}" # The timeout is important. -timeout $(printf %03d $timeoutSecs)s curl -F "data=@${source}" -k https://collabora:9980/cool/convert-to/$convertTo > "${dest}" +timeout $(printf %03d $timeoutSecs)s curl -F "data=@${source}" -k $COLLABORA_URL/convert-to/$convertTo > "${dest}" exit 0 diff --git a/mod/etherpad/etherpad-export.sh b/mod/etherpad/etherpad-export.sh index 6bf6e672..0ebd7331 100755 --- a/mod/etherpad/etherpad-export.sh +++ b/mod/etherpad/etherpad-export.sh @@ -4,6 +4,6 @@ dest="$(echo $8 | sed -E -e 's/html|odt/'$7'/')" convertTo="$7" -curl -v -F "data=@${src}" -k https://collabora:9980/cool/convert-to/$convertTo > "${dest}" +curl -v -F "data=@${src}" -k $COLLABORA_URL/convert-to/$convertTo > "${dest}" exit 0 \ No newline at end of file diff --git a/sample.env b/sample.env index f717d9f0..1cc1fc21 100644 --- a/sample.env +++ b/sample.env @@ -18,6 +18,7 @@ ENABLE_GREENLIGHT=true # Deactivate if you use an external coturn server # https://www.collaboraonline.com/ ENABLE_COLLABORA=true +COLLABORA_URL=https://collabora:9980/cool # Coturn # Enable Coturn service