Chatting with RocketChat

Just another WordPress site

Chatting with RocketChat

You will never win from all the main-stream applications that are out there like WhatsApp, Signall etc, but how cool is it to be in full control of the data by hosting your own chat server.
Below the YML as we used it. Remember to remove the marked mongo db section that is intended to create the initial database, otherwise you loose data when you run the YML again.

version: '2'

services:
  rocketchat:
    image: rocketchat/rocket.chat:latest
    container_name: RocketChat
    command: >
      bash -c
        "for i in `seq 1 30`; do
          node main.js &&
          s=$$? && break || s=$$?;
          echo \"Tried $$i times. Waiting 5 secs...\";
          sleep 5;
        done; (exit $$s)"
    restart: unless-stopped
    volumes:
      - rocketchat:/app/uploads
    environment:
      - PORT=4480
      - ROOT_URL=http://rc.bee-network.nl
      - MONGO_URL=mongodb://mongo:27017/rocketchat
      - MONGO_OPLOG_URL=mongodb://mongo:27017/local
      - MAIL_URL=smtp://smtp.ziggo.nl
      - Accounts_UseDNSDomainCheck=false
      - VIRTUAL_HOST=###{domain name}###
      - VIRTUAL_PORT=4480
      - LETSENCRYPT_HOST=###{domain name}###
      - LETSENCRYPT_EMAIL=###{email address}###
    depends_on:
      - mongo
    networks:
      - nginx-proxy
    ports:
      - 4480:4480

  mongo:
    image: mongo:4.0
    container_name: RocketChatDb
    restart: unless-stopped
    volumes:
     - rocketdb:/data/db
     - rocketdump:/dump
    command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1
    networks:
      - nginx-proxy

volumes:
  rocketchat:
    external:
      name: vol_RocketChat
  rocketdb:
    external:
      name: vol_RocketChatDb
  rocketdump:
    external:
      name: vol_RocketChatDump

networks:
  nginx-proxy:
    external:
      name: proxy_nginx

Leave a Reply

Your email address will not be published. Required fields are marked *