Skip to content

feat(docker): add a bbb-init image for the databases and data directories - #26693

Merged
TiagoJacobs merged 14 commits into
bigbluebutton:v4.1.x-developfrom
tibroc:feat/bbb-init
Nov 26, 2026
Merged

TiagoJacobs merged 14 commits into
bigbluebutton:v4.1.x-developfrom
tibroc:feat/bbb-init

Conversation

@tibroc

@tibroc tibroc commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

The compose setup creates its data directories, PostgreSQL roles and databases with init.sh, mounted into the postgres image, and takes the two schemas from the graphql-server and shared-notes-server images through type: image volumes. Any other orchestrator, such as a Kubernetes Job, would have to copy that script and work out how to get the schemas.

Those two image volumes also break init after a reboot or daemon restart: image mounts lose their content then (moby/moby#50999, see the results in #26711), and with a subpath the container fails with cannot access path. That is the failure #26734 documents under troubleshooting. With the schemas in its own image, init has no image volumes.

Change

  • A bbb-init image, built by bake like the other images: the postgres image the compose file runs (so psql matches the server), the script (moved, only paths changed), and the two schemas copied from this commit's sources at the package paths. One image tag means one schema for bbb-init and graphql-server alike.
  • Listed in the bake default group, docker/README.md (with its environment: PGHOST, PGUSER, PGPASSWORD and the four role passwords) and Dependabot. CI builds it with the other targets.
  • The init service runs that image; the script mount and the image volumes go away.

Behaviour

Unchanged: databases are recreated only when the schema checksum changes, roles and hasura_app are kept, data directories are owned by 998.

Checked

Fresh start (all containers healthy, the join path passes); a second start recreates nothing; after a schema checksum change bbb_graphql is recreated and the join path still passes; a wrong POSTGRES_PASSWORD makes init exit non-zero with its message.

After the rebase onto v4.1.x-develop with #26719, with bbb-init built locally and the published v4.1.x-develop-20261125T164633-426e7c8 images for the rest: docker compose config -q passes with compose 2.35.1 and 2.40.3 and has no type: image volume left; all 25 containers healthy; the join path passes; init exits 0, a second up -d recreates nothing and init exits 0 again; after a restart of the Docker daemon with its containerd (as in a reboot) docker compose up -d succeeds and init exits 0. install.sh downloads every file and writes .env; installing from it needs a published bbb-init image, which CI builds once this is merged.

… env

The two services read the addresses of the other services, and shared-notes-server its
database password, from environment variables, which win over the override files, as
export-annotations already does. This removes docker/compose/bbb-graphql-middleware.yml and
the inline bbb-shared-notes-server.yml; its runnerScript is no longer read since the PDF
export uses the conversion socket. An admin's file at the bare-metal path now holds only
their changes. install.sh no longer downloads the removed files.
@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: e18e060d-ba58-423b-ac43-9a8b49a89dbc

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

@github-actions

Copy link
Copy Markdown

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

TiagoJacobs and others added 13 commits November 26, 2026 02:16
shared-notes-server reads bbb-web's base URL from BBB_WEB_URL and ignores BBB_WEB_HOST.
record-and-playback reads REDIS_HOST, BN_NOTES_ENDPOINT, PLAYBACK_HOST and
SHARED_SECRET, so the inline recording.yml and bbb-web.properties go away.
An admin's own recording.yml, mounted at its bare-metal path, now holds
only their changes.
docker-compose.yml no longer has an inline recording.yml to start from: the recording services get their wiring from the environment.
… read

The recording services no longer mount an inline recording.yml, so an
override that replaced it is ignored without an error and the extra
formats stop being processed.
A release tag vX.Y.Z is also pushed as vX.Y when it is the newest vX.Y.Z
in the repository. Re-runs of older releases and pre-releases leave the
alias alone.
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.
…vironment

COOL_URL sets the Collabora Online server; without it the script uses
https://127.0.0.1:9980 as before.

A failed request now ends the script with curl's exit code and leaves no
output file. Before, curl wrote the error body (or nothing) to the output
file and the script exited 0, so bbb-web took it as a converted PDF.
bbb-web converts office documents by calling the script in
presOfficeConversionExec, and the compose stack provided none. A new
service, office-conversion, runs Collabora Online (CODE). The bbb-web
image gets the sample client convert-cool.sh at its package path,
/usr/share/bbb-libreoffice-conversion/convert-cool.sh, and compose selects
it with PRESOFFICECONVERSIONEXEC; it sends to the service at COOL_URL.

office-conversion is on a network with web only, without a route out and
without an address for the host. It accepts convert-to from that network
only, has no admin console, no capabilities, no-new-privileges and a
read-only root; Collabora then runs each document in a landlock jail.
Every BBB image has a BBB_<IMAGE>_IMAGE variable since bigbluebutton#26710, and init no longer mounts the schemas from the graphql-server and shared-notes-server images.
init runs from the bbb-init image and mounts no image volumes any more, so its stopped container no longer points to stale image mounts.
@github-actions

Copy link
Copy Markdown

⏳ Automated tests are running...

@TiagoJacobs
TiagoJacobs merged commit 9204c21 into bigbluebutton:v4.1.x-develop Nov 26, 2026
116 of 120 checks passed
@tibroc
tibroc deleted the feat/bbb-init 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.

3 participants