Skip to content

bonita: do not publish database port and require passwords in compose example - #2725

Merged
tianon merged 1 commit into
docker-library:masterfrom
Bonitasoft-Community:docs/compose_credentials
Nov 30, 2026
Merged

tianon merged 1 commit into
docker-library:masterfrom
Bonitasoft-Community:docs/compose_credentials

Conversation

@abirembaut

@abirembaut abirembaut commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

The bonita compose example published the database port on every host interface and shipped fixed example passwords.

Changes:

  • stops publishing the database port: Bonita reaches the database over the Compose network, so nothing outside the Compose project needs it
  • makes POSTGRES_PASSWORD, BONITA_RUNTIME_ADMIN_PASSWORD and PLATFORM_PASSWORD required (${VAR:?...}): Compose refuses to start until they are set, for example in a .env file next to compose.yaml
  • updates content.md to explain how to set them and why the database port stays closed
  • updates the example to Bonita 2026.2 and bonitasoft/bonita-postgres:16.16, the current image of the PostgreSQL 16 line it supports

Tested with docker compose up:

  • with a password missing, Compose stops with an explicit error naming each missing variable
  • with the three passwords set, Bonita 2026.2 starts with no database authentication errors and the database publishes no port
  • inside the Compose network, the database roles accept their configured passwords and refuse the previous bpm
  • the portal accepts the chosen runtime administrator password and rejects the previous example one

Thanks to ozgun kultekin, wakefield (wakefield.co), @oz9un, for reporting this and proposing the change.

… compose example

Bonita reaches the database over the Compose network, so the example no
longer publishes the database port.

The database superuser, bonita and business_data role, runtime
administrator and platform administrator passwords now come from the
environment (for example a .env file next to compose.yaml), and Compose
refuses to start until they are set, instead of shipping fixed example
values. The bonitasoft/bonita-postgres image creates the bonita and
business_data roles with the passwords the bonita container connects with.

Also update the example to Bonita 2026.2 and bonitasoft/bonita-postgres:16.16.

@tianon tianon 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.

This is fine with me, but a couple notes:

  • I don't love the custom image we're pointing to here, although I get it (and it's very, very pre-existing now)
  • this makes the "example" a bit harder to test out as-is, but that's fair
    • #2721 is related and might be interesting to you
  • we never intended for any of the compose snippets in our docs to be usable as-is for real production use cases -- maybe we need to do something more explicit about that 😞

@tianon
tianon merged commit 7bd0be6 into docker-library:master Nov 30, 2026
6 checks passed
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