- 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.
Discourse
A platform for community discussion
- Category: Apps
- Status: 3, experimental
- Image:
discourse/discourse, 4, upstream - Healthcheck: yes
- Backups: yes
- Email: yes
- Tests: yes
- SSO: no
Note
: this recipe runs the official, experimental
discourse/discourseimage. Upstream does not yet recommend it for production — see https://meta.discourse.org/t/380646. Use with care.
Basic usage
- Set up Docker Swarm and
abra - Deploy
coop-cloud/traefik abra app new discourse --secretsabra app config YOURAPPDOMAIN— setDOMAINandDISCOURSE_DEVELOPER_EMAILSabra app deploy YOURAPPDOMAIN- Open the configured domain in your browser to finish set-up. The first account
that registers with an address listed in
DISCOURSE_DEVELOPER_EMAILSbecomes an admin.
The app serves plain HTTP on port 80; Traefik terminates TLS in front of it. The
image's built-in nginx/Let's Encrypt is disabled by the recipe (install-ssl
override) so it works behind the reverse proxy.
Add an admin user
abra app run YOURAPPDOMAIN app discourse admin create
Postgres major version upgrades
Handled automatically by the discourse/postgres image (pgvector + an
auto-upgrade layer). On deploy it finds an older cluster, installs the old
binaries and runs pg_upgrade into the new versioned data directory. No manual
dump/restore needed.
pg_upgrade must run as the old cluster's bootstrap superuser (its "install
user"). The recipe uses POSTGRES_USER, which defaults to postgres — the right
value for fresh installs and for clusters that came from the old bitnami recipe.
If your cluster was bootstrapped with a different superuser (e.g. discourse),
set POSTGRES_USER in the app .env before upgrading, otherwise pg_upgrade
will refuse with an install-user mismatch.
Migrating from the previous (bitnami) recipe
The official image stores uploads under /shared rather than bitnami's
/bitnami/discourse. On first boot the recipe copies uploads + backups from the
old bitnami volume (mounted read-only at /legacy) into /shared, once,
idempotently. The Postgres database is reused as-is. After a successful migration
a later recipe version will drop the transitional /legacy mount.
If you are upgrading from the bitnami recipe, also remove the now-unused sidekiq service that swarm leaves behind (sidekiq runs inside the app container now):
docker service rm YOURSTACK_sidekiq