Running Discourse stable in Docker

Discourse is the software running this forum. This document will guide you through installing a low-maintenance, standalone instance of Discourse for your site.

The following post is a wiki: please get acquainted with the recommendations before jumping in.

Installing and Maintaining a Standalone Discourse

After following this runbook, you will have a running instance of Discourse for yourself.

Overview

  1. Installing Discourse
  2. Setting up email
  3. Configuration tips
  4. Low Maintenance
  5. Beyond Standalone Discourse

Installing Discourse

Discourse has a thorough installation guide with Docker which we shall break down to the minimum: if you encounter an issue, please refer to that guide.

Domain setup

We recommend using Gandi LiveDNS and Gandi Mail services for the simplest setup possible.

1. Obtain a domain on Gandi

Gandi domains come with LiveDNS (instant activation of records) and the Gandi Mail service that provides infinite forwarding addresses, which will be useful for our email setup.

If you use another domain and email provider, adapt your setup!

Setting up email

TBC

Configuration tips

TBC

Low maintenance

By default, discourse_docker follows the tests-passed branch, which is updated every day. This brings you the cutting edge features and fixes. But you are required to upgrade more often.

Instead you can follow the stable branch that incorporates critical fixes and follows stable releases. In your container YAML file, edit the params from:

params:                                                                                          │
  ## Which Git revision should this container use? (default: tests-passed)                       │
  version: tests-passed

to follow stable:

params:                                                                                          │
  ## Which Git revision should this container use? (default: tests-passed)                       │
  version: stable

Picking up changes

Now run:

# cd /var/discourse
# ./launcher rebuild standalone

Beyond Standalone Discourse

This setup has the advantage of simplicity: you can be up and running within an hour or less. But it does not scale to multiple servers, or multiple domains. Such configuration is less widely documented, but you can follow the Multisite configuration with Docker guide for a starter.

As Discourse created their own intricate way of using Docker, it’s a bit complicated to reproduce a classical docker and docker-compose setup, which @unteem is working on:

@how we have been using those images discourse & discourse-web & compose for a couple of months, it has been working well for us at IndieHosters.

I would not recommend to use the official discourse

1 Like

My plan was actually to get this docker-compose Discourse thing running, and I realized you made a release recently. I certainly would recommend the official Discourse setup since it’s the one that is supported and provides one-click upgrades. Nevertheless I’m planning to move on to your setup, and that’s another step. Thank you for keeping it up-to-date. Maybe you can start a new topic explaining your setup, @unteem?

fyi, my plugins (tested and working):

- exec:
    cd: $home/plugins
    cmd:
      - git clone https://github.com/discourse/docker_manager.git
      - git clone https://github.com/discourse/discourse-voting.git
      - git clone https://github.com/discourse/discourse-push-notifications.git
      - git clone https://github.com/discourse/discourse-chat-integration.git
      - git clone https://github.com/discourse/discourse-translator.git
      - git clone https://github.com/discourse/discourse-akismet.git
      - git clone https://github.com/discourse/discourse-bbcode-color.git
      - git clone https://github.com/discourse/discourse-signatures.git
      - git clone https://github.com/discourse/discourse-bbcode.git
      - git clone https://github.com/discourse/discourse-tooltips.git
      - git clone https://github.com/discourse/discourse-footnote.git
      - git clone https://github.com/discourse/discourse-styleguide.git
      - git clone https://github.com/gdpelican/collude.git
      - git clone https://github.com/angusmcleod/discourse-events.git
      - git clone https://github.com/angusmcleod/discourse-locations.git
1 Like

Here’s what we’re currently running here:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-assign.git
          - git clone https://github.com/discourse/discourse-encrypt.git
          - git clone https://github.com/discourse/discourse-footnote.git
          # - git clone https://github.com/discourse/discourse-github.git
          - git clone https://github.com/discourse/discourse-policy.git
          - git clone https://github.com/discourse/discourse-saml.git
          - git clone https://github.com/discourse/discourse-solved.git
          - git clone https://github.com/discourse/discourse-spoiler-alert.git
          # - git clone https://github.com/discourse/discourse-voting.git
          - git clone https://github.com/angusmcleod/discourse-custom-wizard.git
          - git clone https://github.com/angusmcleod/discourse-events.git
          - git clone https://github.com/angusmcleod/discourse-locations.git
          # - git clone https://github.com/angusmcleod/discourse-moderator-extension.git
          - git clone https://github.com/cpradio/discourse-plugin-checklist.git
          - git clone https://github.com/davidtaylorhq/discourse-whos-online.git
          # - git clone https://github.com/fuerst/embed-etherpad-lite.git
          # - git clone https://github.com/gdpelican/collude.git
          - git clone https://lab.libreho.st/librehosters/embed-codimd.git

I commented out Collude since I’ve had issues with it (losing edits) and we use CodiMD anyway.
Voting is not the way we want to do things here (and we already have :+1: and :-1: on Gitlab), and we do not use Github… Moderator extension is pending some fixes…