switch app to official discourse/discourse image (with idempotent migration) #16

Merged
notplants merged 3 commits from discourse-official into main 2026-07-07 22:17:09 +00:00
Owner

Replaces the paywalled bitnamilegacy app with the official discourse/discourse image

The migration is automatic, other than the env var changes mentioned in release notes (https://git.coopcloud.tech/coop-cloud/discourse/pulls/16/files#diff-4aee966e8b70b89de8df216eef186a72e555f8db)

The new discourse image seems to require pgvector also... so we are stuck using pgvector + our bespoke auto-postgres-upgrade script (but on the plus side, it appears to be working)

Replaces the paywalled bitnamilegacy app with the official discourse/discourse image The migration is automatic, other than the env var changes mentioned in release notes (https://git.coopcloud.tech/coop-cloud/discourse/pulls/16/files#diff-4aee966e8b70b89de8df216eef186a72e555f8db) The new discourse image seems to require `pgvector` also... so we are stuck using `pgvector` + our bespoke auto-postgres-upgrade script (but on the plus side, it appears to be working)
notplants added 1 commit 2026-06-18 22:01:36 +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).
Member

Looks good, and nice to see that migrating works fine for everyone on the Bitnami image!

The new discourse image seems to require pgvector also... so we are stuck using pgvector + our bespoke auto-postgres-upgrade script (but on the plus side, it appears to be working)

Have you seen the discourse/discourse-postgres image? This looks to be based on pgvector and includes auto-upgrade.

Looks good, and nice to see that migrating works fine for everyone on the Bitnami image! > The new discourse image seems to require `pgvector` also... so we are stuck using `pgvector` + our bespoke auto-postgres-upgrade script (but on the plus side, it appears to be working) Have you seen the [discourse/discourse-postgres](https://github.com/discourse/discourse-postgres) image? This looks to be based on pgvector and includes auto-upgrade.
Author
Owner

thank you @dannygroenewegen ! I hadn't seen that. pushing a new commit now that uses that instead

thank you @dannygroenewegen ! I hadn't seen that. pushing a new commit now that uses that instead
notplants added 1 commit 2026-06-22 20:03:17 +00:00
feat(db): switch to discourse/postgres image (auto-upgrade)
continuous-integration/drone/pr Build is failing
1f77af93bd
Move the db off the bitnami-era pgvector:pg17 + hand-rolled pg_upgrade entrypoint
to discourse/postgres:pg18 (pgvector + discourse's auto-upgrade layer). The image
runs the in-place major-version pg_upgrade itself on boot; the recipe configures it
via env:

- a small inline entrypoint injects the db password secret into $DB_PASSWORD (the
  image expects it in the env, no *_FILE support)
- POSTGRES_USER (the install user pg_upgrade must match) defaults to 'postgres' --
  correct for fresh installs and bitnami-origin clusters -- overridable from .env
- POSTGRES_INITDB_ARGS=--no-data-checksums so the new pg18 cluster matches pre-18
  clusters (pg18 initdb enables checksums by default; pg_upgrade needs a match)

- mount postgresql_data at /var/lib/postgresql (versioned PGDATA .../18/docker)
- pg_backup.sh uses POSTGRES_USER for the dump/drop/recreate; fix paths
- document the POSTGRES_USER override in .env.sample, README and the release note
- drop entrypoint.postgres.sh.tmpl

Tested on cctest: pg17->pg18 upgrade preserves data and serves over HTTPS; fresh
install works; backup+restore round-trips.
Author
Owner

with this discourse/discourse-postgres version, I couldn't figure out how to do the automatic detecting of the postgres install user (which defaults to postgres but could be discourse for some older deployments), so I added a new env var where this could be set and a release note about checking if this env need to be set for this migration

so one more manual step for the migration, but I think using this discourse/discourse-postgres image simplifies things overall and going forward

I have tested the migration path again, but will confirm again when my brain is less tired

with this `discourse/discourse-postgres` version, I couldn't figure out how to do the automatic detecting of the postgres `install user` (which defaults to `postgres` but could be `discourse` for some older deployments), so I added a new env var where this could be set and a release note about checking if this env need to be set for this migration so one more manual step for the migration, but I think using this discourse/discourse-postgres image simplifies things overall and going forward I have tested the migration path again, but will confirm again when my brain is less tired
notplants added 1 commit 2026-07-07 22:10:58 +00:00
Update release/next
continuous-integration/drone/pr Build is failing
1096c38e34
Author
Owner

just tested this on a production deployment, and it appeared to work after running into another issue that you need to abra app undeploy before deploying this new version, for the migration to run smoothly

added a warning to release/next with this info

probably also a good idea to ensure you have a backup before this big upgrade just in case, but merging it in now

just tested this on a production deployment, and it appeared to work after running into another issue that you need to `abra app undeploy` before deploying this new version, for the migration to run smoothly added a warning to release/next with this info probably also a good idea to ensure you have a backup before this big upgrade just in case, but merging it in now
notplants marked the pull request as ready for review 2026-07-07 22:17:00 +00:00
notplants merged commit 9d5c8ae3ca into main 2026-07-07 22:17:09 +00:00
notplants deleted branch discourse-official 2026-07-07 22:17:09 +00:00
Sign in to join this conversation.