Difference between revisions of "SAC:Discourse"

From OSGeo
Jump to navigation Jump to search
(Created page with "OSGeo hosts a [https://discourse.org/ Discourse] server accessible at https://discourse.osgeo.org The server is an LXD VM running on hosted on SAC Service Status#osgeo9|osg...")
 
(simplify the procmail snippet)
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
# SAC:Discourse    [rev:134263 2025-09-20T09:40:58Z]
 +
 
OSGeo hosts a [https://discourse.org/ Discourse] server accessible at https://discourse.osgeo.org
 
OSGeo hosts a [https://discourse.org/ Discourse] server accessible at https://discourse.osgeo.org
  
The server is an LXD VM running on hosted on [[SAC Service Status#osgeo9|osgeo9]] machine and administered by the [[SAC|OSGeo System Administration Committee]].
+
The service runs in a set of Docker containers inside an LXD VM hosted on [[SAC Service Status#osgeo9|osgeo9]] machine and administered by the [[SAC|OSGeo System Administration Committee]].
 +
 
 +
Gory details are in private https://gitea.osgeo.org/sac/discourse/wiki/discourse
 +
 
 +
 
 +
= Usage =
 +
 
 +
== Sign up ==
 +
 
 +
It current allows OSGeo LDAP, OSGeo Gitea, GitHub, and local sign up methods
 +
 
 +
== Organizing nofication emails ==
 +
 
 +
Discourse sends emails with headers that can help you filter and organize them, these look like this:
 +
 
 +
<pre>
 +
    List-ID: OSGeo Discourse | Testing <testing.discourse.osgeo.org>
 +
    X-Discourse-Post-Id: 446250
 +
    X-Discourse-Topic-Id: 154115
 +
    X-Discourse-Category: Testing
 +
    X-Discourse-Sender: robe
 +
</pre>
 +
 
 +
Here is an example procmail snippet that use those headers:
 +
 
 +
<pre>
 +
  # Generic OSGeo Discourse filtering
 +
  :0
 +
  * ^List-ID: postgis\.discourse\.osgeo\.org>
 +
  postgis-discourse
 +
</pre>
 +
 
 +
 
 +
= Deploy =
 +
 
 +
The deploy was done following upstream instructions here:
 +
https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md#6-install-discourse
 +
 
 +
Those instruction imply an interactive session, but at the end of the process we are left with a couple of docker containers:
 +
 
 +
  - import
 +
  - mail-receiver
 +
 
 +
 
 +
= Administration =
 +
 
 +
All administrative tasks are done via the web interface.
 +
 
 +
Some seem to require intervention on host files ( ie: receiver.yml ?).
 +
 
 +
We should put more configuration into ansible, see https://trac.osgeo.org/osgeo/ticket/3424
 +
 
 +
== Mail gateway ==
 +
 
 +
Discourse sends mail using lists.osgeo.org as the SMTP server (see '''DISCOURSE_SMTP_ADDRESS''' in ''/var/discourse/containers/app.yml'') and `discourse.osgeo.org` as the domain name.
 +
 
 +
Receives mail on its own, via an MX record for discourse.osgeo.org (but see https://trac.osgeo.org/osgeo/ticket/3068 for an issue about that).
 +
 
 +
The incoming mail is received via a network forward on the LXD host of port 25 for the public IP address 140.211.15.5 to the '''discourse''' VM container which in turn proxies it to the `mail-receiver' docker container. This setup has an unwanted side-effect of making the mails sent from other containers on the same LXD host as Discourse appear as coming from a private IP address, which in turn may trigger a rejection due to SPF not allowing that. See https://trac.osgeo.org/osgeo/ticket/3395#comment:31
 +
 
 +
== Issues ==
 +
 
 +
Known issues about the Discourse service can be found here:
 +
https://trac.osgeo.org/osgeo/query?component=SysAdmin%2FDiscourse&status=!closed
 +
 
 +
== Mailing list migration ==
  
 
Some of mailman mailing lists have been migrated to Discourse.
 
Some of mailman mailing lists have been migrated to Discourse.
Line 7: Line 74:
 
Details on how to ask for migration of your list are here https://discourse.osgeo.org/docs?topic=6765
 
Details on how to ask for migration of your list are here https://discourse.osgeo.org/docs?topic=6765
  
 +
== Theming ==
 +
 +
We tweak the login form CSS a little in order to fix the LDAP button background, the labels, and to tweak the display order of the options.
 +
 +
This is done from https://discourse.osgeo.org/admin/customize/themes/1/common/scss/edit
 +
 +
<pre>
 +
.btn.ldap {
 +
    background-color: #fff;
 +
    order: 1;
 +
}
 +
 +
.btn.ldap:hover {
 +
    background-color: var( --primary-medium );
 +
}
 +
 +
.btn.ldap span.btn-social-title {
 +
    visibility: hidden;
 +
}
 +
 +
.btn.ldap span.btn-social-title:before {
 +
    visibility: visible;
 +
    content: 'Log in with OSGeo UserID (LDAP)';
 +
}
 +
 +
.btn.oidc {
 +
    order: 2;
 +
}
 +
 +
.btn.oidc span.btn-social-title {
 +
    visibility: hidden;
 +
}
 +
 +
.btn.oidc span.btn-social-title:before {
 +
    visibility: visible;
 +
    content: 'Log in with OSGeo Gitea';
 +
}
 +
 +
.btn.passkey-login-button {
 +
    order: 3;
 +
}
 +
 +
.btn.github {
 +
    order: 4;
 +
}
 +
</pre>
  
 
[[Category:Infrastructure]]
 
[[Category:Infrastructure]]
 
[[Category:Services]]
 
[[Category:Services]]

Latest revision as of 04:00, 13 June 2026

  1. SAC:Discourse [rev:134263 2025-09-20T09:40:58Z]

OSGeo hosts a Discourse server accessible at https://discourse.osgeo.org

The service runs in a set of Docker containers inside an LXD VM hosted on osgeo9 machine and administered by the OSGeo System Administration Committee.

Gory details are in private https://gitea.osgeo.org/sac/discourse/wiki/discourse


Usage

Sign up

It current allows OSGeo LDAP, OSGeo Gitea, GitHub, and local sign up methods

Organizing nofication emails

Discourse sends emails with headers that can help you filter and organize them, these look like this:

    List-ID: OSGeo Discourse | Testing <testing.discourse.osgeo.org>
    X-Discourse-Post-Id: 446250
    X-Discourse-Topic-Id: 154115
    X-Discourse-Category: Testing
    X-Discourse-Sender: robe

Here is an example procmail snippet that use those headers:

  # Generic OSGeo Discourse filtering
  :0
  * ^List-ID: postgis\.discourse\.osgeo\.org>
  postgis-discourse


Deploy

The deploy was done following upstream instructions here: https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md#6-install-discourse

Those instruction imply an interactive session, but at the end of the process we are left with a couple of docker containers:

  - import
  - mail-receiver


Administration

All administrative tasks are done via the web interface.

Some seem to require intervention on host files ( ie: receiver.yml ?).

We should put more configuration into ansible, see https://trac.osgeo.org/osgeo/ticket/3424

Mail gateway

Discourse sends mail using lists.osgeo.org as the SMTP server (see DISCOURSE_SMTP_ADDRESS in /var/discourse/containers/app.yml) and `discourse.osgeo.org` as the domain name.

Receives mail on its own, via an MX record for discourse.osgeo.org (but see https://trac.osgeo.org/osgeo/ticket/3068 for an issue about that).

The incoming mail is received via a network forward on the LXD host of port 25 for the public IP address 140.211.15.5 to the discourse VM container which in turn proxies it to the `mail-receiver' docker container. This setup has an unwanted side-effect of making the mails sent from other containers on the same LXD host as Discourse appear as coming from a private IP address, which in turn may trigger a rejection due to SPF not allowing that. See https://trac.osgeo.org/osgeo/ticket/3395#comment:31

Issues

Known issues about the Discourse service can be found here: https://trac.osgeo.org/osgeo/query?component=SysAdmin%2FDiscourse&status=!closed

Mailing list migration

Some of mailman mailing lists have been migrated to Discourse.

Details on how to ask for migration of your list are here https://discourse.osgeo.org/docs?topic=6765

Theming

We tweak the login form CSS a little in order to fix the LDAP button background, the labels, and to tweak the display order of the options.

This is done from https://discourse.osgeo.org/admin/customize/themes/1/common/scss/edit

.btn.ldap {
    background-color: #fff;
    order: 1;
}

.btn.ldap:hover {
    background-color: var( --primary-medium );
}

.btn.ldap span.btn-social-title {
    visibility: hidden;
}

.btn.ldap span.btn-social-title:before {
    visibility: visible;
    content: 'Log in with OSGeo UserID (LDAP)';
}

.btn.oidc {
    order: 2;
}

.btn.oidc span.btn-social-title {
    visibility: hidden;
}

.btn.oidc span.btn-social-title:before {
    visibility: visible;
    content: 'Log in with OSGeo Gitea';
}

.btn.passkey-login-button {
    order: 3;
}

.btn.github {
    order: 4;
}