Compare commits

..
23 Commits
Author SHA1 Message Date
Christian Galo 421ddc8888 Drop the legacy bitnami volume now that uploads are migrated 2026-11-08 00:29:57 -06:00
Christian Galo ea7a45a438 Drop --no-data-checksums; discourse/postgres:pg18 now disables checksums itself before pg_upgrade and fails if initdb already did 2026-11-08 00:11:20 -06:00
Christian Galo 8210de07a5 Merge branch 'main' of git.coopcloud.tech:coop-cloud/discourse 2026-11-08 00:11:20 -06:00
notplants 630cba809d chore: publish 1.1.3+2026.7.4 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2026-11-02 14:33:03 -05:00
autonomic-bot 5906ec9269 chore: upgrade app to discourse/discourse:2026.7.4
continuous-integration/drone/push Build is failing
2026-10-30 02:28:39 +00:00
trav 7adb714307 chore: publish 1.1.2+2026.7.3 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2026-10-05 10:05:52 -07:00
autonomic-bot 3f2384fd0e chore: upgrade app to discourse/discourse:2026.7.3
continuous-integration/drone/push Build is failing
2026-09-28 20:20:28 +00:00
trav d1f9b66a2e chore: publish 1.1.1+2026.7.2 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2026-09-21 09:37:58 -07:00
trav 3c81abc2a1 Merge pull request 'chore: upgrade app to discourse/discourse:2026.7.2' (#19) from upgrade-89420d3 into main
continuous-integration/drone/push Build is failing
Reviewed-on: #19
2026-09-21 16:37:23 +00:00
autonomic-bot 89420d3f0c chore: upgrade app to discourse/discourse:2026.7.2
continuous-integration/drone/pr Build is failing
2026-08-28 02:34:00 +00:00
notplants 5878b3ed09 fix version of release notes to be correctly at 1.0.0+3.5.3 (I incorrectly created a tag manually last time, instead of using abra app release)
continuous-integration/drone/push Build is failing
2026-08-10 16:44:18 -04:00
notplants 77f4a7350b chore: publish 1.1.0+2026.7.1 release
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is passing
2026-08-10 16:38:18 -04:00
notplants fdf62b4257 Merge pull request 'Upgrade to discourse:2026.7.1' (#17) from upgrade-c10c04c into main
continuous-integration/drone/push Build is failing
Reviewed-on: #17
2026-08-10 20:37:21 +00:00
autonomic-bot f8dcc78013 chore: merge upstream main into the upgrade branch
continuous-integration/drone/pr Build is failing
The branch predated the official-image migration (coop-cloud/discourse#16), so its
merge-base was 0.8.1+3.5.0 and the PR's file list re-showed that migration's changes
as if this PR introduced them. The branch TREE already matched upstream; only its
history lacked those commits. Recording the merge leaves the PR's diff as what it
actually changes: app 3.5.3 -> 2026.7.1 and redis 7.4-alpine -> 8.10-alpine.

Conflict in compose.yml resolved in favour of the branch (both sides edited the same
image lines; the branch already carries upstream's official-image switch plus the
version bumps). Resulting tree is byte-identical to the pre-merge branch tree.
2026-08-10 20:34:10 +00:00
autonomic-bot bfa21bc44e chore: upgrade app to 2026.7.1, redis to 8.10-alpine 2026-08-03 22:24:21 +00:00
autonomic-bot 0d7519e9ef chore: upgrade app 3.5.3 -> 2026.1.5, redis 7.4-alpine -> 8.8-alpine 2026-07-13 17:59:04 +00:00
notplants 9d5c8ae3ca Merge pull request 'switch app to official discourse/discourse image (with idempotent migration)' (#16) from discourse-official into main
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is passing
Reviewed-on: #16
2026-07-07 22:17:09 +00:00
notplants 1096c38e34 Update release/next
continuous-integration/drone/pr Build is failing
2026-07-07 22:10:56 +00:00
autonomic-bot c10c04c520 chore: upgrade redis 7.4-alpine -> 8.8-alpine 2026-06-19 02:21:36 +00:00
Christian Galo b7e23a690e update readme 2025-02-19 08:31:44 +00:00
Christian Galo fac465fe99 chore: update Discourse version to 3.2.2 2024-06-11 02:22:32 +00:00
Christian Galo 8897924813 update README and Discourse version 2023-10-16 23:18:58 +00:00
Christian Galo 4cde5121b7 ¿Abra? No. ¡Cierre! 2023-09-08 06:15:14 +00:00
8 changed files with 24 additions and 175 deletions
-40
View File
@@ -1,40 +0,0 @@
---
kind: pipeline
name: deploy to swarm-test.autonomic.zone
steps:
- name: deployment
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
settings:
host: swarm-test.autonomic.zone
stack: discourse
generate_secrets: true
purge: true
deploy_key:
from_secret: drone_ssh_swarm_test
networks:
- proxy
environment:
DOMAIN: discourse.swarm-test.autonomic.zone
STACK_NAME: discourse
LETS_ENCRYPT_ENV: production
SECRET_DB_PASSWORD_VERSION: v1
DB_ENTRYPOINT_VERSION: v1
trigger:
branch:
- main
---
kind: pipeline
name: generate recipe catalogue
steps:
- name: release a new version
image: plugins/downstream
settings:
server: https://build.coopcloud.tech
token:
from_secret: drone_abra-bot_token
fork: true
repositories:
- toolshed/auto-recipes-catalogue-json
trigger:
event: tag
-29
View File
@@ -1,29 +0,0 @@
TYPE=discourse
DOMAIN=discourse.example.com
## Domain aliases
#EXTRA_DOMAINS=', `www.discourse.example.com`'
LETS_ENCRYPT_ENV=production
# Admin / developer accounts (comma-separated); these become admins on signup
DISCOURSE_DEVELOPER_EMAILS=admin@example.com
# Outgoing email (official discourse/discourse env names)
#DISCOURSE_SMTP_ADDRESS=
#DISCOURSE_SMTP_PORT=587
#DISCOURSE_SMTP_USER_NAME=
#DISCOURSE_SMTP_AUTHENTICATION=login
#DISCOURSE_SMTP_ENABLE_START_TLS=true
# Set this if you send e-mail from a different address than noreply@$DOMAIN
#DISCOURSE_NOTIFICATION_EMAIL=
# SMTP password as a secret
#SECRET_SMTP_PASSWORD_VERSION=v1
SECRET_DB_PASSWORD_VERSION=v1
# Postgres bootstrap superuser (the cluster's "install user"). Defaults to
# `postgres`, which matches fresh installs and bitnami-origin clusters. Only set
# this if you are upgrading a cluster that was bootstrapped with a different
# superuser (e.g. `discourse`) — a postgres major upgrade fails unless it matches.
#POSTGRES_USER=postgres
+1
View File
@@ -0,0 +1 @@
.env
+12 -63
View File
@@ -1,75 +1,24 @@
# 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)
Wiki Cafe's configuration for a Discourse deployment. Originally slimmed down from an `abra` [recipe](https://git.coopcloud.tech/coop-cloud/discourse) by [Co-op Cloud](https://coopcloud.tech/).
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 -->
## Deploying the app with Docker Swarm
> **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`
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
Set the environment variables from the .env file during the shell session.
```
abra app run YOURAPPDOMAIN app discourse admin create
set -a && source .env && set +a
```
## 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.
[`discourse/postgres`]: https://github.com/discourse/discourse-postgres
## 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):
Set the secrets.
```
docker service rm YOURSTACK_sidekiq
printf "SECRET_HERE" | docker secret create SECRET_NAME -
```
Deploy using the `-c` flag to specify one or multiple compose files.
```
docker stack deploy discourse --detach=true -c compose.yaml -c compose.smtpauth.yaml
```
-4
View File
@@ -1,4 +0,0 @@
export PG_BACKUP_VERSION=v4
export APP_ENTRYPOINT_VERSION=v2
export APP_INSTALL_SSL_VERSION=v1
export APP_MIGRATE_UPLOADS_VERSION=v1
@@ -1,6 +1,3 @@
---
version: "3.8"
services:
app:
# the wrapper entrypoint reads /run/secrets/smtp_password and exports
@@ -11,4 +8,4 @@ services:
secrets:
smtp_password:
external: true
name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION}
name: ${STACK_NAME}_smtp_password
+10 -16
View File
@@ -1,9 +1,7 @@
---
version: "3.8"
services:
app:
image: discourse/discourse:3.5.3
image: discourse/discourse:2026.7.4
networks:
- proxy
- internal
@@ -27,8 +25,6 @@ services:
- DISCOURSE_NOTIFICATION_EMAIL
volumes:
- 'discourse_shared:/shared'
# transition only: legacy bitnami volume, read-only, for one-time upload migration
- 'discourse_data:/legacy:ro'
secrets:
- db_password
configs:
@@ -54,7 +50,9 @@ services:
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "coop-cloud.${STACK_NAME}.version=1.0.0+3.5.3"
- "caddy=${DOMAIN}"
- "caddy.reverse_proxy={{upstreams 80}}"
- "caddy.tls.on_demand="
healthcheck:
test: "curl -fsS http://localhost/srv/status || exit 1"
interval: 30s
@@ -99,9 +97,6 @@ services:
# `postgres` matches fresh installs and bitnami-origin clusters. Override in
# the app .env (POSTGRES_USER=...) only for a cluster bootstrapped differently.
- POSTGRES_USER=${POSTGRES_USER:-postgres}
# pg18's initdb enables data checksums by default, but pg13-17 clusters here
# have them off and pg_upgrade requires a match -> initialise without them.
- POSTGRES_INITDB_ARGS=--no-data-checksums
healthcheck:
test: "pg_isready -U discourse -d discourse"
interval: 30s
@@ -116,7 +111,7 @@ services:
backupbot.restore.post-hook: "/pg_backup.sh restore"
redis:
image: redis:7.4-alpine
image: redis:8.10-alpine
networks:
- internal
volumes:
@@ -131,13 +126,12 @@ services:
secrets:
db_password:
external: true
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
name: ${STACK_NAME}_db_password
volumes:
postgresql_data:
redis_data:
discourse_shared:
discourse_data:
networks:
proxy:
@@ -146,14 +140,14 @@ networks:
configs:
app_entrypoint:
name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION}
name: ${STACK_NAME}_app_entrypoint
file: cc-app-entrypoint.sh
app_install_ssl:
name: ${STACK_NAME}_app_install_ssl_${APP_INSTALL_SSL_VERSION}
name: ${STACK_NAME}_app_install_ssl
file: app-install-ssl.sh
app_migrate_uploads:
name: ${STACK_NAME}_app_migrate_uploads_${APP_MIGRATE_UPLOADS_VERSION}
name: ${STACK_NAME}_app_migrate_uploads
file: migrate-uploads.sh
pg_backup:
name: ${STACK_NAME}_pg_backup_${PG_BACKUP_VERSION}
name: ${STACK_NAME}_pg_backup
file: pg_backup.sh
-19
View File
@@ -1,19 +0,0 @@
This release switches from the bitnami image to the official discourse/discourse
image. Some env vars need to be renamed for this migration; everything else
should happen automatically.
Rename these in your app's .env (the values carry over):
DISCOURSE_SMTP_HOST --> DISCOURSE_SMTP_ADDRESS
DISCOURSE_SMTP_USER --> DISCOURSE_SMTP_USER_NAME
DISCOURSE_SMTP_AUTH --> DISCOURSE_SMTP_AUTHENTICATION
DISCOURSE_SMTP_PROTOCOL --> DISCOURSE_SMTP_ENABLE_START_TLS (takes a boolean true/false, not the old tls/ssl value, so translate it rather than copying it straight across)
WARNING: if your deployment's database has an "install user" other than `postgres`
(some older deployments do), you must set the POSTGRES_USER env var in your .env
for this migration, otherwise the postgres upgrade aborts with an install-user
mismatch.
Check your old deployment's install user before upgrading (if this command returns postgres, then you do not need to set this env):
abra app run YOURAPPDOMAIN db -- psql -U discourse -tAc 'select rolname from pg_roles where oid = 10'