How do you set up multiple discourse forums on the same server?

AI-generated summary

Setting up Multiple Discourse Forums on the Same Server

AstonJ is seeking advice on setting up multiple Discourse forums on the same server. They propose a method involving:

  • Setting different ports in app.yml for each forum
  • Installing each Discourse in its own directory
  • Installing Discourse as normal in the respective directories

However, codinghorror suggests searching for “multisite” for relevant how-to topics and riking recommends using the “multiple websites” tutorial with web.socketed.template.yml and multiple standalone containers.

AstonJ finds a related how-to topic (Multisite configuration with Docker) but finds it complex and decides to revisit the issue later. codinghorror shares a YouTube video on the topic, but it’s unclear if it addresses AstonJ’s concerns.

Is it as simple as:

  1. Setting different ports in app.yml:
## which TCP/IP ports should this container expose?
expose:
  - "8001:80"   # fwd host port 80   to container port 80 (http)
  - "2222:22" # fwd host port 2222 to container port 22 (ssh)

Where 8001 is different for each Discourse forum, so 8002, 8003, etc (And then HAproxy direct the traffic to the relevant ports per domain).

  1. install each Discourse in its own directory:
## These containers are stateless, all data is stored in /shared
volumes:
  - volume:
      host: /home/site1/apps/discourse/shared/standalone
      guest: /shared
  - volume:
      host: /home/site1/apps/discourse/shared/standalone/log/var-log
      guest: /var/log

Where site1 reflects each site, so site2, site3 etc.

  1. and then you install Discourse as normal, in the above case, in /home/site1/apps/discourse/

…Or is it more involved than that?

Search for multisite here, there are a few howto topics on it. But that’s the search string you want.

You could also use the “multiple websites” tutorial where you use web.socketed.template.yml, plus multiple standalone containers.

Do you mean this how-to Multisite configuration with Docker

Doesn’t seem very straight forward going by all the comments :frowning: (thought Docker was meant to make this stuff easy)

I think I will come back to it when I’ve got more time…

5 Likes

1 Like