Skip to content

build(docker): use the new config options of #26170-#26175 in the images - #26217

Merged
antobinary merged 8 commits into
bigbluebutton:v4.1.x-developfrom
tibroc:images/config-options
Oct 30, 2026
Merged

antobinary merged 8 commits into
bigbluebutton:v4.1.x-developfrom
tibroc:images/config-options

Conversation

@tibroc

@tibroc tibroc commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #26170, #26171, #26172, #26173, #26174 and #26175. Those changes let the components read their settings in a way that works in a container, so the images no longer need their own workarounds. It also makes the bbb-nginx image work again: since #26175 its location files proxy to named upstreams (bbb-web, bbb-graphql-middleware, ...), which only the bbb-config package defines; the image does not.

One commit per component:

  • bbb-apps-akka: drops the image's bbb-apps-akka.conf. application.conf now reads the secret, the service URLs and the database hosts from the environment. The image's file only includes the defaults. The README lists REDIS_PASSWORD too.
  • bbb-web: drops the entrypoint that wrote SERVER_URL, SHARED_SECRET and REDIS_HOST into bbb-web.properties. Environment variables now override the properties files, e.g. BIGBLUEBUTTON_WEB_SERVERURL, SECURITYSALT, REDISHOST.
  • logging (akka-apps, bbb-web): BBB_LOG_FILE_APPENDER=STDOUT replaces the sed on logback.xml.
  • bbb-export-annotations: drops the entrypoint that edited settings.json. Deployments mount /etc/bigbluebutton/bbb-export-annotations.json.
  • graphql-middleware, shared-notes: SERVER_HOST=0.0.0.0 replaces the sed on the default config.
  • nginx: ships bbb-upstreams.conf with the default service names, and points Hasura to graphql-server. nginx resolves webhooks per request (the image ships its own webhooks.nginx), so it starts and stays quiet when webhooks is not running.

Changed variable names (v4.1.x-develop images only)

bbb-web no longer reads SHARED_SECRET, SERVER_URL or REDIS_HOST; it reads SECURITYSALT, BIGBLUEBUTTON_WEB_SERVERURL and REDISHOST. export-annotations no longer reads BBB_REDIS_HOST or BBB_WEB_HOST; it reads the mounted /etc/bigbluebutton/bbb-export-annotations.json. A deployment that still passes the old names starts without an error, but bbb-web uses the default securitySalt from bigbluebutton.properties and export-annotations uses 127.0.0.1, so rename them when updating. The compose setup in #26186 already uses the new names.

Tests

  • I built the six changed images with docker buildx bake.
  • I ran them with the compose setup of feat(docker): docker compose setup for one server #26186 in Docker 29.9.1. The configuration came from environment variables and the export-annotations override file, and the compose setup mounted no nginx location files except its site and playback.nginx.
  • After 120 s all 24 containers were running and none had restarted.
  • I created and joined a meeting through the API, the HTML5 client, the GraphQL websocket, a shared-notes PDF export, the learning dashboard, presentation conversion and LiveKit signalling. All of these worked.
  • A recorded meeting with microphone and webcam was archived, processed and published, and its playback was served.
  • /bigbluebutton/api/hooks returns 502 without webhooks. After webhooks starts it reaches webhooks, without restarting nginx.

Needs the /etc/bigbluebutton/bbb-export-annotations.json override file in
bbb-export-annotations; deployments mount it instead of setting variables.
…address

Needs the SERVER_HOST support in bbb-graphql-middleware and bbb-shared-notes-server.
…ames

The location files proxy to the upstreams of bbb-upstreams.conf. The image
ships that file with the services' default names, as it does for the three
static apps, so a deployment that uses these names mounts no nginx files.
webhooks is optional, so nginx resolves it at run time through the
container's DNS server and starts without it.
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review: 4
  • v3.0.x-release
  • v3.0.x-develop
  • v4.0.x-release
  • v4.0.x-develop

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 68c5849c-e9d3-4dec-bde7-0f510ba77f45

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread docker/nginx/Dockerfile
&& sed -i -e 's/listen 80;/listen 8080;/' -e 's/listen \[::\]:80;/listen [::]:8080;/' \
/etc/nginx/sites-available/bigbluebutton \
&& sed -i 's/listen 127.0.0.1:8185;/listen 8185;/' /etc/nginx/sites-available/hasura-loadbalancer.conf \
&& sed -i -e 's/listen 127.0.0.1:8185;/listen 8185;/' -e 's/server 127.0.0.1:8085;/server graphql-server:8085;/' \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tibroc

tibroc commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator Author

@antobinary

On bare metal, "two Hasuras" means a second bbb-graphql-server@8086 unit plus one more server line in upstream hasura. The middleware connects to nginx on 8185, and nginx balances with least_conn.

In the containers it works the same way, except that the instances are replicas of one service. The nginx image keeps the balancer, listens on 8185 and has server graphql-server:8085;. nginx resolves that name when it starts and adds every address it gets as an upstream server. In compose (#26186), the middleware now connects to ws://nginx:8185/v1/graphql, as on bare metal, so:

docker compose up -d --scale graphql-server=2
docker compose exec nginx nginx -s reload    # nginx picks up the new instance

Scaling down works the same way: reload nginx afterwards. Until then it keeps the old address, gets a connect error on it, and retries on the remaining instance (joins still worked, but some took about 18 s instead of 8 s). On Kubernetes you set replicas: 2 on the graphql-server Deployment, put it behind a headless Service named graphql-server, and roll or reload nginx after a scale.

One difference from bare metal: the image applies the metadata on every start (Hasura's cli-migrations entrypoint), while the package applies it once in after-install. I started two instances at the same moment three times. Each time one of them failed with a 409 "metadata resource version ... did not match", exited, and came up fine after the automatic restart. Both instances then reported consistent metadata, and join and recording tests passed with two instances.

@antobinary antobinary left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed this against the merge base (cc4fed1) and the current v4.1.x-develop (9fffe59), and it merges cleanly. I built and ran the nginx image. I checked the other five images by reading the code, not by building them.

Check Result
Every variable the images now rely on is read upstream: the ${?VAR} lines in akka's application.conf, BBB_LOG_FILE_APPENDER in both logback.xml, SERVER_HOST in graphql-middleware and shared-notes, the export-annotations override path, and bbb-web's environment-first property sources. All still there on current v4.1.x-develop PASS
Every proxy_pass in the fragments the nginx image copies has an upstream in bbb-upstreams.conf, with the same six names as bbb-config's file PASS
Service names and variables match the compose in #26186 (SECURITYSALT, BIGBLUEBUTTON_WEB_SERVERURL, REDISHOST, mounted bbb-export-annotations.json) PASS
No key in bigbluebutton.properties maps to a variable the container already sets (HOSTNAME, HOME, PATH, JAVA_HOME, ...) PASS
Nothing still refers to the deleted entrypoints or docker/bbb-apps-akka.conf PASS
nginx image with --read-only, a tmpfs /tmp and stub backends: it starts and writes resolver 127.0.0.11 valid=30s; to /tmp/bbb-resolver.conf PASS
/bigbluebutton/api/hooks without webhooks returns 502. Once webhooks starts it returns 200 within 30 s, with no reload PASS

None of the following blocks the PR.

1. nginx logs an error every 30 s while webhooks is not running. resolve looks the name up again every valid=30s, whether or not anyone calls the hooks API. In the #26186 compose, webhooks is an optional profile, so in a default deployment this line repeats about 2,900 times a day:

[error] 27#27: webhooks could not be resolved (2: Server failure)

The minimum fix is a sentence in the README. Alternatively, the image could ship its own webhooks.nginx that resolves the name per request, as it already ships its own html5, dashboard and player fragments. I tested that on top of this PR:

  • no log lines while idle, and one per actual request
  • 502 without webhooks
  • the first request after webhooks starts succeeds

With this change the webhooks address lives in the fragment instead of bbb-upstreams.conf, so the README paragraph needs a matching edit. proxy_redirect default cannot be combined with a variable in proxy_pass, so the fragment names the prefix explicitly:

--- a/docker/nginx/Dockerfile
+++ b/docker/nginx/Dockerfile
@@ -28,6 +28,8 @@ COPY bigbluebutton-web/loadbalancer.nginx \
 # names, as bbb-upstreams.conf does for the backends.
 COPY docker/nginx/bbb-html5.nginx docker/nginx/learning-dashboard.nginx docker/nginx/playback.nginx \
      /usr/share/bigbluebutton/nginx/
+# webhooks is optional: this location resolves its name per request instead of in an upstream
+COPY docker/nginx/webhooks.nginx /usr/share/bigbluebutton/nginx/
 # The base image's entrypoint renders the resolver for webhooks into /tmp at start (read-only root).
 ENV NGINX_ENTRYPOINT_LOCAL_RESOLVERS=1 NGINX_ENVSUBST_OUTPUT_DIR=/tmp
 COPY docker/nginx/bbb-resolver.conf.template /etc/nginx/templates/
--- a/docker/nginx/bbb-upstreams.conf
+++ b/docker/nginx/bbb-upstreams.conf
@@ -14,8 +14,3 @@ upstream bbb-webrtc-sfu {
 upstream bbb-shared-notes-server {
     server shared-notes-server:8787;
 }
-# Optional service: resolved at run time, so nginx starts without it (502 until it runs).
-upstream bbb-webhooks {
-    zone bbb-webhooks 64k;
-    server webhooks:3005 resolve;
-}
--- /dev/null
+++ b/docker/nginx/webhooks.nginx
@@ -0,0 +1,11 @@
+# Pass to the webhooks app all requests made to the webhooks API. Optional service: the name is
+# resolved per request, so nginx starts and stays quiet without it (502 until it runs).
+location /bigbluebutton/api/hooks {
+    set $bbb_webhooks webhooks:3005;
+    proxy_pass         http://$bbb_webhooks;
+    proxy_redirect     http://$bbb_webhooks/ /;
+    proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;
+    proxy_set_header   X-Real-IP         $remote_addr;
+    proxy_set_header   Host              $http_host;
+    proxy_set_header   X-NginX-Proxy     true;
+}

2. The nginx image now needs the base image's entrypoint. Without the entrypoint, the resolver file is never written and nginx refuses to start:

nginx: [emerg] no resolver defined to resolve names at run time in upstream "bbb-webhooks" in /etc/nginx/conf.d/bbb-upstreams.conf:18

docker run --entrypoint nginx ... shows this, and a Kubernetes command: would cause it too, because it replaces the entrypoint. The README already says the nginx images use the base image's entrypoint. One sentence saying this is now required would help.

3. Variable names changed for anyone using the published develop images. bbb-web no longer reads SHARED_SECRET, SERVER_URL or REDIS_HOST. export-annotations no longer reads BBB_REDIS_HOST or BBB_WEB_HOST. A deployment that still passes the old names starts without an error, but bbb-web falls back to the default securitySalt from bigbluebutton.properties, and export-annotations falls back to 127.0.0.1. This affects only the v4.1.x-develop images, and #26186 already uses the new names, so a line in the PR description is enough.

4. A follow-up on the "two Hasuras" question, for a separate PR. Now that the image has a resolver, the Hasura upstream could resolve its name at run time too. Then --scale graphql-server=N would take effect within 30 s, without an nginx reload. On this nginx (1.30.6), least_conn accepts resolve: nginx -t passes. #26248 already adds the zone that resolve needs. In the Dockerfile's sed, the change would be server graphql-server:8085 resolve;. I only checked the config; I did not test scaling.

Nit: in akka-bbb-apps/Dockerfile, "the image's only includes the defaults" is missing a word. It should read something like "the image's file only includes upstream's defaults".

@tibroc

tibroc commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator Author

@antobinary thanks for the thorough review. Two new commits:

  • 1. webhooks: I took your webhooks.nginx. The image now copies it instead of the package's fragment, and bbb-webhooks is no longer in bbb-upstreams.conf; the README paragraph is updated. Tested with a read-only root and stub backends: no log lines while idle (one per request), /bigbluebutton/api/hooks 502 without webhooks, 200 right after webhooks starts with no reload, and a Location: http://webhooks:3005/... from webhooks is rewritten to the public host.
  • 2. entrypoint: with the fragment nginx no longer needs the resolver to start. With --entrypoint nginx it starts and is healthy, only the hooks API fails (502, no resolver defined to resolve webhooks). The README now says the image must run with its entrypoint, and that a Kubernetes command: replaces it.
  • 3. variable names: added a section to the description.
  • 4. Hasura with resolve: agreed, I'll do that as a separate PR after fix(bbb-graphql-middleware): share the Hasura balancer's connection counts between nginx workers #26248.
  • Nit: fixed.

@github-actions

Copy link
Copy Markdown

🚨 Automated tests failed

@antobinary
antobinary merged commit dde29bf into bigbluebutton:v4.1.x-develop Oct 30, 2026
65 of 67 checks passed
antobinary added a commit to antobinary/bigbluebutton that referenced this pull request Nov 3, 2026
v4.1.x-develop gained bigbluebutton#26219, bigbluebutton#26267, bigbluebutton#26217, bigbluebutton#26248, bigbluebutton#26348 and three
Dependabot image bumps since 9fffe59. They merge cleanly; the merge
is here so that the two commits that follow can change
bigbluebutton-web/Dockerfile and build-all-images.yml as those files
now are on 4.1.
@tibroc
tibroc deleted the images/config-options branch November 26, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants