Public Repository

Last pushed: 2 months ago
Short Description
Docker image for bringing up a RabbitMQ cluster
Full Description

This docker image brings up a RabbitMQ server and can be used for bringing up a full-fledged clustered fully configurable with the number of nodes using docker-compose. The docker files are available here - https://github.com/bijukunjummen/docker-rabbitmq-cluster.

Here is a sample docker-compose file which brings up a 3 node cluster and can easily be extended:

version: '2'
services:
  rabbit1:
    image: bijukunjummen/rabbitmq-server:3.6.10
    hostname: rabbit1
    ports:
      - "5672:5672"
      - "15672:15672"
    environment:
      - RABBITMQ_DEFAULT_USER=myuser
      - RABBITMQ_DEFAULT_PASS=mypass
  rabbit2:
    image: bijukunjummen/rabbitmq-server:3.6.10
    hostname: rabbit2
    links:
      - rabbit1
    environment: 
     - CLUSTERED=true
     - CLUSTER_WITH=rabbit1
     - RAM_NODE=true
    ports:
        - "5673:5672"
        - "15673:15672"

  rabbit3:
    image: bijukunjummen/rabbitmq-server:3.6.10
    hostname: rabbit3
    links:
      - rabbit1
      - rabbit2
    environment: 
     - CLUSTERED=true
     - CLUSTER_WITH=rabbit1
    ports:
          - "5674:5672"
Docker Pull Command
Owner
bijukunjummen

Comments (3)
nithinondocker
a year ago

Appreciate your contribution. Was very helpful. Thanks a ton.

lineshgajera
a year ago

I tried using your docker-compose file but I am getting following error. I am not sure how to fix it

Cannot start container 5873fd5aa5a0e66178420a0f7c56410b20a72e8e1fe08046eb04dd84c3880a2c: failed to create endpoint cluster_rabbit1_1 on network bridge: Error starting userland proxy: listen tcp 0.0.0.0:15672: bind: address already in use

cvanhorn
2 years ago

Appreciate this, makes a lot of sense.

Question though, how would you add new cluster nodes to this 3 container build if the additional containers were hosted on a different server (LAN)? Can this build be configured for clustering over LAN instead of container links?