Running two discourse in one server

I’m going to duplicate from /var/discourse to /var/discourse2 and make it run both discourse docker together in a server.

Preparing

sudo -s
git clone https://github.com/discourse/discourse_docker.git /var/discourse2
cd /var/discourse2

Transfer

Create a directory for the second discourse

mkdir -p /var/discourse2/shared/standalone/backups/default
cp  /var/discourse/container/app.yml /var/discourse/container/app2.yml 

Modify App2.yml

expose:
 # - "80:80"   # http - - Remember to change the port
 # - "443:443" # https - Remember to change the port

-------------------
volumes:
  - volume:
      host: /var/discourse2/shared/standalone
      guest: /shared
  - volume:
      host: /var/discourse2/shared/standalone/log/var-log
      guest: /var/log

Rebuild and Start

cd /var/discourse2
./launcher rebuild app2
./launcher start app2

Checking

docker ps
[[email protected] app2]# docker ps

CONTAINER ID | IMAGE | COMMAND | CREATED | STATUS | PORTS | NAMES 438daf9fe81c | local_discourse/app2 | "/sbin/boot" | About an hour ago | Up 19 minutes | app2 cef267209b67 | local_discourse/app | "/sbin/boot" | 2 hours ago | Up 56 minutes | app

Tags:

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.