Skip to content

feat(docker): serve the HTML5 client, dashboard and player from the main nginx - #26711

Draft
tibroc wants to merge 4 commits into
bigbluebutton:v4.1.x-developfrom
tibroc:feat/static-bundle-images
Draft

tibroc wants to merge 4 commits into
bigbluebutton:v4.1.x-developfrom
tibroc:feat/static-bundle-images

Conversation

@tibroc

@tibroc tibroc commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Draft: image mounts lose their content after a daemon restart or reboot (moby/moby#50999), see the comments below. Waiting for a fix in Docker. Based on #26710; its own changes are the last two commits (compare).

The HTML5 client, the learning dashboard and the player each ran their own nginx only to hand static files to the main nginx. Their images now hold only the built files (FROM scratch), at the paths their packages install them to. nginx mounts them read-only as image volumes (Docker Engine 28 / Compose 2.35; Kubernetes image volumes: on by default from 1.35, stable in 1.36) and serves them with the packages' own location files, as on bare metal. The compose stack loses three containers (about 50 MiB), and the images shrink: the dashboard from 100 to 9 MB, the player from 117 to 25 MB, the client from 498 to 406 MB. bbb-web's dashboard reports, which share a directory with the app on bare metal, are mounted for nginx at /srv/learning-dashboard. init creates the two mount points, as the packages do.

docker compose pull does not pull images that are only mounted, and Compose before 5.1 doesn't recreate nginx when such an image changes under the same tag. The upgrade section of the docs shows the extra pull and --force-recreate, recommends Compose 5.1 or later, and links the Compose issue and its open fix (docker/compose#13809, docker/compose#13811). Tested with Compose 2.35.1, 2.40.3 and 5.6.0: a fresh start, joining a meeting, the dashboard with data, and a recording played back.

@coderabbitai

coderabbitai Bot commented Nov 24, 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: ef7ae41f-0fda-481c-bc14-fb35a5a1ef7c

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

@tibroc
tibroc force-pushed the feat/static-bundle-images branch 2 times, most recently from b7ad9d1 to 55fd807 Compare November 24, 2026 18:05
@github-actions

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

BBB_IMAGE_TAG still selects the version of all images. Each BBB image
can now also be set in .env with a full reference, BBB_<IMAGE>_IMAGE,
e.g. BBB_WEB_IMAGE=localhost/bbb-web:dev. The variable applies wherever
the image is used, including the schema mounts of init, which an
override file could not change.

The sample override keeps only pull_policy: never for local builds.
The webpack dev server setup for the HTML5 client was a second
mechanism next to docker-compose.override.yml: extra compose files in
docker/compose/dev/, added through COMPOSE_FILE in .env, with which
compose reads the override only if COMPOSE_FILE lists it.

docker-compose.override.sample.yml now has one commented HTML5 block:
the location file as an inline config mounted at the package path, the
locales of the source tree, and two variants, the dev server on your
machine or in a container. docker/compose/dev/ is removed.
…y images

bbb-html5-client, bbb-learning-dashboard and bbb-playback each ran their
own nginx only to hand static files to the main nginx. They now hold
only the built files (FROM scratch), at the paths their packages install
them to. A deployment mounts them into bbb-nginx at the same paths.

bbb-nginx gets the packages' location files for them in place of the
proxy locations: bbb-html5.nginx* (bbb-html5), learning-dashboard.nginx
(bbb-learning-dashboard) and playback.nginx (bbb-playback). The
dashboard's image covers /var/bigbluebutton/learning-dashboard, where
bbb-web writes its reports, so nginx reads the reports from
/srv/learning-dashboard.
nginx mounts the HTML5 client, the learning dashboard and the player
from their images as read-only image volumes, at the package paths, and
the html5-client, learning-dashboard and playback services go away. The
player is now always there, also without the recording profile.

init creates the two mount points under ./data/bigbluebutton, as the
packages do, and nginx starts after it: a mount point cannot be created
inside the read-only /var/bigbluebutton. The reports of bbb-web are
mounted at /srv/learning-dashboard.

docker compose pull does not pull images that are only mounted, and
before Compose 5.1 up -d does not recreate nginx when the image behind
a tag changed. The docs show how to pull them and recreate nginx.
@tibroc
tibroc force-pushed the feat/static-bundle-images branch from 4ca73da to a83749e Compare November 25, 2026 13:11
tibroc added a commit to tibroc/bigbluebutton that referenced this pull request Nov 25, 2026
…(html5 dev setup in the override sample)
@tibroc
tibroc marked this pull request as ready for review November 25, 2026 13:20
@antobinary antobinary added this to the Release 4.1 milestone Nov 25, 2026
@github-actions

Copy link
Copy Markdown

✅ Automated tests have passed!

@germanocaumo

Copy link
Copy Markdown
Contributor

Heads-up: with this PR, nginx would not come back after a reboot. The three type: image mounts it adds to nginx (html5-client, learning-dashboard, playback) use a subpath, and those don't survive a restart. That's the open moby/moby#50999; its fix, moby/moby#52734, isn't merged. #26734 documents the same failure for init ("up fails after a reboot"), adding that the services that were running come back on their own. That stops holding for nginx here, so the site would be down rather than only init failing.

I reproduced it with the pattern alone, in clean docker:29.10-dind daemons with compose 5.7.1:

services:
  nginx:
    image: nginx:1.27-alpine
    restart: unless-stopped
    volumes:
      - type: image
        source: alpine:3
        target: /usr/share/nginx/html/static
        image:
          subpath: etc
containerd image store overlay2
systemctl restart docker nginx keeps running nginx exited, mount empty
reboot nginx exited, mount empty
then docker compose up -d cannot access path /var/lib/docker/rootfs/overlayfs/<id>/etc cannot access path /var/lib/docker/overlay2/<id>/merged/etc
docker compose up -d --force-recreate nginx back nginx back

Until moby#50999 is fixed, keeping image mounts off long-running services seems safest. A --force-recreate after every reboot works, but nothing does it automatically.

@tibroc
tibroc marked this pull request as draft November 25, 2026 16:42
@tibroc

tibroc commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks, confirmed, and it's worse without subpath. I ran your pattern on Engine 28.5.2 and 29.10.1, each with the overlay2 and containerd stores. With subpath I get exactly your table. Without subpath, every case that fails with it comes back running with an empty mount after the restart, and up -d succeeds without fixing it. Docker binds the empty mount-point directory instead of the image's content; the subpath only turns this into an error. So for nginx, dropping the subpath would give a running nginx that serves 404s for the client, with a passing healthcheck.

Engine / store Event with subpath without
28.5.2 / overlay2 daemon restart, reboot exited, cannot access path running, mount empty
28.5.2 / containerd reboot exited, cannot access path running, mount empty
29.10.1 / overlay2 daemon restart, reboot exited, cannot access path running, mount empty
29.10.1 / containerd reboot exited, cannot access path running, mount empty

I'm moving this PR back to draft until moby#50999 is fixed for both stores. The same applies to init's two schema mounts on develop; #26693 removes them by giving init its own image with the schemas.

@github-actions

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@TiagoJacobs

Copy link
Copy Markdown
Member

I left this one out of the merges of the other follow-ups: with it applied, nginx does not come back after a reboot of the host, and the site stays down until nginx is recreated.

Seen on #26711 + #26692 + #26693 rebased onto #26734, on Docker Engine 29.10.1 with the containerd image store. After a reboot, with the stack running or after docker compose stop, nginx fails to start (exit code 128 on boot) and docker compose up -d stops with

Error response from daemon: cannot access path /var/lib/docker/rootfs/overlayfs/<id>/usr/share/bigbluebutton/html5-client: lstat /var/lib/docker/rootfs/overlayfs/<id>/...: no such file or directory

docker compose up -d --force-recreate nginx brings it back. The same reboots pass without this PR, on what is now v4.1.x-develop.

I am looking into the best way to solve this and will come back with options soon.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants