notplants 9f61774737 fix(db): switch postgres image to pgvector/pgvector:pg17 + bump PG_BACKUP_VERSION
- Switch db image from postgres:16 to pgvector/pgvector:pg17. The
  bundled discourse-ai plugin's migration 20230710171141 runs
  'CREATE EXTENSION IF NOT EXISTS vector' on every boot; without
  the extension binaries installed in the postgres image, the
  migration transaction is aborted and the app crash-loops. The
  pgvector image is debian-based (bookworm) with the postgres
  apt repo + pgdg.list already configured, so the recipe's
  homegrown pg_upgrade entrypoint continues to work across major
  version bumps.
- Bump PG_BACKUP_VERSION v1 → v2: the prior 'improved comments'
  commit edited pg_backup.sh content without bumping the config
  version, so any operator redeploying without a fresh stack
  would hit 'only updates to Labels are allowed' from docker
  swarm (configs are immutable; content change needs a new name).
2026-06-02 20:05:44 +00:00
2025-01-08 10:09:12 -08:00
2022-11-22 15:58:04 +01:00
2026-06-02 19:10:27 +00:00
2025-12-28 02:04:01 +00:00

Discourse

Build Status

A platform for community discussion

  • Category: Apps
  • Status:
  • Image: bitnami/discourse
  • Healthcheck: yes
  • Backups: no
  • Email: yes
  • Tests: no
  • SSO: no

Basic usage

  1. Set up Docker Swarm and abra
  2. Deploy coop-cloud/traefik
  3. abra app new discourse --secrets (optionally with --pass if you'd like to save secrets in pass)
  4. abra app config YOURAPPDOMAIN - be sure to change $DOMAIN to something that resolves to your Docker swarm box
  5. abra app deploy YOURAPPDOMAIN
  6. Open the configured domain in your browser to finish set-up

To add a new admin user

  1. Login to the instance abra app run APPNAME app sh
  2. cd /opt/bitnami/discourse
  3. RAILS_ENV=production bundle exec rake admin:create and follow prompts.

Install plugins

  1. Login to instance abra app run APPNAME app sh
  2. cd /bitnami/discourse/plugins/
  3. git clone plugin.git for example https://github.com/discourse/discourse-openid-connect.git
  4. abra app restart YOURAPPDOMAIN app

Events / calendar plugin

We've had some luck running discourse-events.

Setup Notes

Until issue #1 is fixed, the default user is user and the default password is bitnami123

Postgres major version upgrades

Welcome to hell.

  1. abra app run YOURAPPDOMAIN db pg_dumpall -U discourse | gzip > YOURAPPDOMAIN_db_DATE.sql.gz
  2. abra app volume ls YOURAPPDOMAIN, find the name of the Postgres data volume
  3. scp the backup to your VPS
  4. abra app undeploy YOURAPPDOMAIN
  5. abra app volume rm YOURAPPDOMAIN, choose the Postgres data volume
  6. abra app deploy YOURAPPDOMAIN, then abra app undeploy YOURAPPDOMAIN
  7. ssh to the VPS, run (replacing 13-alpine with the new Postgres version) docker run -v YOURDATAVOLUME:/var/lib/postgresql/data -e POSTGRES_HOST_AUTH_METHOD=trust -it postgres:13-alpine
  8. In another SSH session on the server, run docker ps to find the ID of the new Postgres container, then docker exec -it CONTAINERID bash
  9. In the shell you just launched, run dropdb -U discourse discourse, then createdb -U discourse discourse, then Ctrl+D or run exit
  10. In the second SSH session, run zcat YOURAPPDOMAIN_db_DATE.sql.gz | docker exec -it CONTAINERID psql -U discourse
  11. Exit the second SSH session
  12. Back in the first SSH session, Ctrl+C to shut down the database
  13. abra app deploy YOURAPPDOMAIN
Description
cc-ci mirror of coop-cloud/discourse
Readme 83 KiB
Languages
Shell 100%