Files
discourse/README.md
notplants 53ba0910a6
All checks were successful
cc-ci/testme cc-ci: success
feat(discourse): switch app to official discourse/discourse image (experimental)
Replaces the paywalled bitnamilegacy app with the official discourse/discourse
image behind Traefik (HTTP-only via an install-ssl override; sidekiq is internal
so its service is dropped). DB is reused as-is; uploads migrate from a legacy
bitnami volume via an idempotent, non-destructive runit hook. db keeps
pgvector/pgvector:pg17 with the install-user-aware pg_upgrade entrypoint, plus
db/redis healthchecks and updated README metadata (lint R002/R007).

Verified on cctest: fresh install, upgrade-from-bitnami-pg17, and
upgrade-from-bitnami-pg13 (incl. 13->17) all serve with data intact.
Upstream marks discourse/discourse experimental; hold prod cutover.

Recipe 0.8.1+3.5.0 -> 1.0.0+3.5.3 (major: new image, env/volume/port changes).
2026-06-16 23:25:29 +00:00

66 lines
2.4 KiB
Markdown

# Discourse
[![Build Status](https://build.coopcloud.tech/api/badges/coop-cloud/discourse/status.svg?ref=refs/heads/main)](https://build.coopcloud.tech/coop-cloud/discourse)
A platform for community discussion
<!-- metadata -->
* **Category**: Apps
* **Status**: 3, experimental
* **Image**: [`discourse/discourse`](https://hub.docker.com/r/discourse/discourse), 4, upstream
* **Healthcheck**: yes
* **Backups**: yes
* **Email**: yes
* **Tests**: yes
* **SSO**: no
<!-- endmetadata -->
> **Note**: this recipe runs the official, **experimental** `discourse/discourse`
> image. Upstream does not yet recommend it for production — see
> <https://meta.discourse.org/t/380646>. Use with care.
## Basic usage
1. Set up Docker Swarm and [`abra`]
2. Deploy [`coop-cloud/traefik`]
3. `abra app new discourse --secrets` (optionally with `--pass` to save secrets in `pass`)
4. `abra app config YOURAPPDOMAIN` — set `DOMAIN` and `DISCOURSE_DEVELOPER_EMAILS`
5. `abra app deploy YOURAPPDOMAIN`
6. Open the configured domain in your browser to finish set-up. The first account
that registers with an address listed in `DISCOURSE_DEVELOPER_EMAILS` becomes
an admin.
[`abra`]: https://docs.coopcloud.tech/abra/
[`coop-cloud/traefik`]: https://git.coopcloud.tech/coop-cloud/traefik
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. The `db` entrypoint detects an older data directory on
deploy and runs `pg_upgrade` in place (it installs the old binaries, detects the
cluster's real install superuser, and upgrades). No manual dump/restore needed.
## 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
```