feat(discourse): switch app to official discourse/discourse image (experimental) #5

Open
autonomic-bot wants to merge 5 commits from discourse-official-image into main

Switch the app from the paywalled bitnamilegacy/discourse image to the official discourse/discourse image behind Traefik (HTTP-only via an install-ssl override; sidekiq runs inside the app container). DB stays on pgvector/pgvector:pg17 with the install-user-aware pg_upgrade entrypoint; uploads migrate from the legacy bitnami volume idempotently.

Mirrors coop-cloud/discourse#16 (same single commit, 0c4539b).

Verified on cctest (fresh install reaches healthy + HTTPS 200). Running !testme to confirm in CI.

Switch the app from the paywalled `bitnamilegacy/discourse` image to the official `discourse/discourse` image behind Traefik (HTTP-only via an install-ssl override; sidekiq runs inside the app container). DB stays on `pgvector/pgvector:pg17` with the install-user-aware `pg_upgrade` entrypoint; uploads migrate from the legacy bitnami volume idempotently. Mirrors coop-cloud/discourse#16 (same single commit, `0c4539b`). Verified on cctest (fresh install reaches healthy + HTTPS 200). Running `!testme` to confirm in CI.
autonomic-bot added 1 commit 2026-06-19 00:39:08 +00:00
Replaces the paywalled bitnamilegacy app with the official discourse/discourse
image behind Traefik. DB is reused as-is; uploads migrate from the legacy
bitnami volume idempotently. The wrapper entrypoint injects the db_password and
smtp_password secrets (the official image has no *_FILE support). SMTP env vars
are renamed to the official names; release notes cover the migration.

Recipe 0.8.1+3.5.0 -> 1.0.0+3.5.3 (major: new image, env/volume/port changes).
Author
Owner

!testme

!testme
Author
Owner

🌻 cc-cidiscourse @ 0c4539b7 passed

cc-ci result card

level

full logs · dashboard

<!-- cc-ci:testme --> 🌻 **cc-ci** — `discourse` @ `0c4539b7` ✅ **passed** [![cc-ci result card](https://ci.commoninternet.net/runs/928/summary.png)](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/928) [![level](https://ci.commoninternet.net/runs/928/badge.svg)](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/928) [full logs](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/928) · [dashboard](https://ci.commoninternet.net/)
autonomic-bot added 1 commit 2026-06-22 16:57:36 +00:00
Replace the bitnami-era pgvector:pg17 db + hand-rolled pg_upgrade entrypoint
with discourse/postgres:pg18 (pgvector + discourse's auto-upgrade layer, as
suggested on coop-cloud/discourse#16). The image does the heavy lifting
(installs old binaries, runs pg_upgrade into the versioned PGDATA); a thin
cc-db-entrypoint.sh wrapper fills the two gaps it leaves:

- secrets: inject DB_PASSWORD/POSTGRES_PASSWORD from the docker secret (the
  image reads them from env, no *_FILE support);
- install user: detect the old cluster's bootstrap superuser (oid 10) and
  export POSTGRES_USER so pg_upgrade + the new cluster's initdb match it. Real
  deployments differ (bitnami-origin clusters install as 'postgres' + a
  'discourse' app role; others as 'discourse'). The image hardcodes
  --username=$POSTGRES_USER and never detects this, so the adapter is required;
- checksums: pg18's initdb enables data checksums by default but pg13-17
  clusters here have them off, and pg_upgrade requires a match -> initdb the new
  cluster with --no-data-checksums unless the old one reports them on.

Other changes:
- mount postgresql_data at /var/lib/postgresql (versioned PGDATA .../18/docker)
- pg_backup.sh: detect the superuser at runtime; fix paths for the new layout
- bump DB_ENTRYPOINT_VERSION v6, PG_BACKUP_VERSION v3 (immutable swarm configs)
- drop entrypoint.postgres.sh.tmpl

Verified on cctest: upgrade from an existing pg17 cluster (install user
'postgres') -> pg18, all data preserved, serves over HTTPS via Traefik.
Author
Owner

!testme

!testme
Author
Owner

🌻 cc-cidiscourse @ 9b33fd87 passed

cc-ci result card

level

full logs · dashboard

<!-- cc-ci:testme --> 🌻 **cc-ci** — `discourse` @ `9b33fd87` ✅ **passed** [![cc-ci result card](https://ci.commoninternet.net/runs/940/summary.png)](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/940) [![level](https://ci.commoninternet.net/runs/940/badge.svg)](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/940) [full logs](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/940) · [dashboard](https://ci.commoninternet.net/)
autonomic-bot force-pushed discourse-official-image from 9b33fd8761 to 0dd3d1d4be 2026-06-22 18:10:21 +00:00 Compare
autonomic-bot force-pushed discourse-official-image from 0dd3d1d4be to f783d9988b 2026-06-22 18:23:24 +00:00 Compare
notplants added 1 commit 2026-06-22 18:37:17 +00:00
autonomic-bot added 1 commit 2026-06-22 18:46:18 +00:00
- pg_backup.sh: use the db service's POSTGRES_USER (default postgres) for the
  dump/drop/recreate instead of detecting the superuser at runtime, since the
  recipe now sets that env var; one-line the constants comment
- release note: explain the in-place pg_upgrade + the POSTGRES_USER override
- bump PG_BACKUP_VERSION v4

Verified on cctest: backup + restore via the hooks round-trips with POSTGRES_USER.
autonomic-bot added 1 commit 2026-06-22 19:24:50 +00:00
autonomic-bot added 1 commit 2026-06-22 19:31:30 +00:00
This pull request has changes conflicting with the target branch.
  • release/1.0.0+3.5.3
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin discourse-official-image:discourse-official-image
git checkout discourse-official-image
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: recipe-maintainers/discourse#5
No description provided.