Commit Graph

10 Commits

Author SHA1 Message Date
9b33fd8761 feat(db): switch to discourse/postgres image with install-user + checksum adapter
All checks were successful
cc-ci/testme cc-ci: success
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.
2026-06-22 16:55:12 +00:00
0c4539b7ad feat(discourse): switch app to official discourse/discourse image (experimental)
All checks were successful
cc-ci/testme cc-ci: success
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).
2026-06-18 21:59:34 +00:00
ee2381c3b7 Update README.md 2025-12-28 02:04:01 +00:00
5868b83948 docs: events plugin 2023-02-09 12:58:47 +01:00
3wc
fd24d4a328 Update abra syntax in examples (finally) [mass update] 2023-01-19 16:02:27 -08:00
3wc
1240106d4d Add rudimentary database backup, and Postgres upgrade misery 2022-11-22 18:42:42 -08:00
72266ada90 Add some useful instructions for setting up users and installing plugins 2021-11-16 11:10:51 -08:00
3wc
984c944454 Add build status to README
[ci skip]
2021-07-25 15:34:54 +02:00
3wc
d7c8c474dc SMTP config, initial README 2021-07-25 14:45:30 +02:00
3wc
e3c7b09c22 Initial import 2021-07-25 13:52:51 +02:00