diff --git a/bitnami/discourse/2026/debian-12/Dockerfile b/bitnami/discourse/2026/debian-12/Dockerfile index 1ac3ae06d506..49073ccd6ee5 100644 --- a/bitnami/discourse/2026/debian-12/Dockerfile +++ b/bitnami/discourse/2026/debian-12/Dockerfile @@ -7,7 +7,7 @@ ARG DOWNLOADS_URL="downloads.bitnami.com/files/stacksmith" ARG TARGETARCH LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ - org.opencontainers.image.created="2026-05-21T18:26:32Z" \ + org.opencontainers.image.created="2026-05-22T13:50:53Z" \ org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/discourse/README.md" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/discourse" \ @@ -54,7 +54,7 @@ COPY rootfs / RUN /opt/bitnami/scripts/discourse/postunpack.sh ENV APP_VERSION="2026.5.0" \ BITNAMI_APP_NAME="discourse" \ - IMAGE_REVISION="10" \ + IMAGE_REVISION="11" \ LD_LIBRARY_PATH="/opt/bitnami/postgresql/lib:$LD_LIBRARY_PATH" \ PATH="/opt/bitnami/python/bin:/opt/bitnami/common/bin:/opt/bitnami/ruby/bin:/opt/bitnami/postgresql/bin:/opt/bitnami/node/bin:/opt/bitnami/brotli/bin:$PATH" diff --git a/bitnami/discourse/2026/debian-12/docker-compose.yml b/bitnami/discourse/2026/debian-12/docker-compose.yml index a6ba866f712a..1cbb0b55e722 100644 --- a/bitnami/discourse/2026/debian-12/docker-compose.yml +++ b/bitnami/discourse/2026/debian-12/docker-compose.yml @@ -30,6 +30,7 @@ services: environment: # ALLOW_EMPTY_PASSWORD is recommended only for development. - ALLOW_EMPTY_PASSWORD=yes + - DISCOURSE_PASSWORD=bitnami123 - DISCOURSE_HOST=www.example.com - DISCOURSE_DATABASE_HOST=postgresql - DISCOURSE_DATABASE_PORT_NUMBER=5432 diff --git a/bitnami/discourse/2026/debian-12/rootfs/opt/bitnami/scripts/discourse-env.sh b/bitnami/discourse/2026/debian-12/rootfs/opt/bitnami/scripts/discourse-env.sh index 429c7410ff6a..d2c069dd6066 100644 --- a/bitnami/discourse/2026/debian-12/rootfs/opt/bitnami/scripts/discourse-env.sh +++ b/bitnami/discourse/2026/debian-12/rootfs/opt/bitnami/scripts/discourse-env.sh @@ -129,7 +129,7 @@ export DISCOURSE_PASSENGER_EXTRA_FLAGS="${DISCOURSE_PASSENGER_EXTRA_FLAGS:-}" # Discourse credentials export DISCOURSE_USERNAME="${DISCOURSE_USERNAME:-user}" # only used during the first initialization -export DISCOURSE_PASSWORD="${DISCOURSE_PASSWORD:-bitnami123}" # only used during the first initialization +export DISCOURSE_PASSWORD="${DISCOURSE_PASSWORD:-}" # only used during the first initialization export DISCOURSE_EMAIL="${DISCOURSE_EMAIL:-user@example.com}" # only used during the first initialization export DISCOURSE_FIRST_NAME="${DISCOURSE_FIRST_NAME:-UserName}" # only used during the first initialization export DISCOURSE_LAST_NAME="${DISCOURSE_LAST_NAME:-LastName}" # only used during the first initialization diff --git a/bitnami/discourse/2026/debian-12/rootfs/opt/bitnami/scripts/discourse-sidekiq/setup.sh b/bitnami/discourse/2026/debian-12/rootfs/opt/bitnami/scripts/discourse-sidekiq/setup.sh index c7322a23710a..80ae77d7c82d 100755 --- a/bitnami/discourse/2026/debian-12/rootfs/opt/bitnami/scripts/discourse-sidekiq/setup.sh +++ b/bitnami/discourse/2026/debian-12/rootfs/opt/bitnami/scripts/discourse-sidekiq/setup.sh @@ -24,7 +24,7 @@ fi . /opt/bitnami/scripts/libdiscoursesidekiq.sh # Ensure Discourse environment variables are valid -discourse_validate +discourse_validate true # Ensure Discourse is initialized discourse_sidekiq_initialize diff --git a/bitnami/discourse/2026/debian-12/rootfs/opt/bitnami/scripts/libdiscourse.sh b/bitnami/discourse/2026/debian-12/rootfs/opt/bitnami/scripts/libdiscourse.sh index b37b616b81ac..a5dea5131d65 100644 --- a/bitnami/discourse/2026/debian-12/rootfs/opt/bitnami/scripts/libdiscourse.sh +++ b/bitnami/discourse/2026/debian-12/rootfs/opt/bitnami/scripts/libdiscourse.sh @@ -32,6 +32,8 @@ fi # 0 if the validation succeeded, 1 otherwise ######################### discourse_validate() { + local -r is_sidekiq="${1:-false}" + debug "Validating settings in DISCOURSE_* environment variables..." local error_code=0 @@ -83,9 +85,7 @@ discourse_validate() { check_empty_value "DISCOURSE_HOST" check_multi_value "DISCOURSE_ENV" "development production test" check_multi_value "DISCOURSE_PASSENGER_SPAWN_METHOD" "direct smart" - check_password_length "DISCOURSE_PASSWORD" 10 ! is_empty_value "$DISCOURSE_ENABLE_HTTPS" && check_yes_no_value "DISCOURSE_ENABLE_HTTPS" - ! is_empty_value "$DISCOURSE_SKIP_BOOTSTRAP" && check_yes_no_value "DISCOURSE_SKIP_BOOTSTRAP" ! is_empty_value "$DISCOURSE_DATABASE_HOST" && check_resolved_hostname "$DISCOURSE_DATABASE_HOST" ! is_empty_value "$DISCOURSE_DATABASE_PORT_NUMBER" && check_valid_port "DISCOURSE_DATABASE_PORT_NUMBER" ! is_empty_value "$DISCOURSE_REDIS_HOST" && check_resolved_hostname "$DISCOURSE_REDIS_HOST" @@ -97,6 +97,15 @@ discourse_validate() { is_boolean_yes "$DISCOURSE_ENABLE_CONF_PERSISTENCE" && warn "The DISCOURSE_ENABLE_CONF_PERSISTENCE configuration is enabled but the ${DISCOURSE_CONF_FILE} file is not writable. The file will not be persisted." fi + # Validation that don't apply to sidekiq + if ! is_boolean_yes "$is_sidekiq"; then + ! is_empty_value "$DISCOURSE_SKIP_BOOTSTRAP" && check_yes_no_value "DISCOURSE_SKIP_BOOTSTRAP" + if ! is_boolean_yes "$DISCOURSE_SKIP_BOOTSTRAP"; then + check_empty_value "DISCOURSE_PASSWORD" + check_password_length "DISCOURSE_PASSWORD" 10 + fi + fi + # Validate credentials if is_boolean_yes "${ALLOW_EMPTY_PASSWORD:-}"; then warn "You set the environment variable ALLOW_EMPTY_PASSWORD=${ALLOW_EMPTY_PASSWORD:-}. For safety reasons, do not use this flag in a production environment." @@ -219,7 +228,6 @@ discourse_initialize() { discourse_conf_set() { local -r key="${1:?key missing}" local -r value="${2:-}" - debug "Setting ${key} to '${value}' in Discourse configuration" # Sanitize key (sed does not support fixed string substitutions) local sanitized_pattern sanitized_pattern="^\s*(#\s*)?$(sed 's/[]\[^$.*/]/\\&/g' <<< "$key")\s*=\s*(.*)" diff --git a/bitnami/discourse/README.md b/bitnami/discourse/README.md index c2b3b79d6e15..e71230f7a05f 100644 --- a/bitnami/discourse/README.md +++ b/bitnami/discourse/README.md @@ -95,7 +95,7 @@ The following tables list the main variables you can set. | `DISCOURSE_PASSENGER_SPAWN_METHOD` | Passenger method used for spawning application processes. Valid values: direct, smart. | `direct` | | `DISCOURSE_PASSENGER_EXTRA_FLAGS` | Extra flags to pass to the Passenger start command. | `nil` | | `DISCOURSE_USERNAME` | Discourse user name. | `user` | -| `DISCOURSE_PASSWORD` | Discourse user password. | `bitnami123` | +| `DISCOURSE_PASSWORD` | Discourse user password. | `nil` | | `DISCOURSE_EMAIL` | Discourse user e-mail address. | `user@example.com` | | `DISCOURSE_FIRST_NAME` | Discourse user first name. | `UserName` | | `DISCOURSE_LAST_NAME` | Discourse user last name. | `LastName` | diff --git a/bitnami/discourse/docker-compose.yml b/bitnami/discourse/docker-compose.yml index a6ba866f712a..1cbb0b55e722 100644 --- a/bitnami/discourse/docker-compose.yml +++ b/bitnami/discourse/docker-compose.yml @@ -30,6 +30,7 @@ services: environment: # ALLOW_EMPTY_PASSWORD is recommended only for development. - ALLOW_EMPTY_PASSWORD=yes + - DISCOURSE_PASSWORD=bitnami123 - DISCOURSE_HOST=www.example.com - DISCOURSE_DATABASE_HOST=postgresql - DISCOURSE_DATABASE_PORT_NUMBER=5432