Setup - Zerpet/docker-rabbitmq-cluster GitHub Wiki
This page describes how to setup and use this image. There are two options: (1) Using docker-compose
or (2) using purely docker
. Docker Compose is recommended over purely docker.
Using Docker Compose
In the folder compose-templates
there are a few YAML templates to help using docker-compose
to spawn the cluster. The aim of Compose is to ease the deployment and reduce the complexity of the commands required to launch the cluster.
The templates for 3-disc nodes and 2-disc 1-ram nodes are ready to use. If you want to use any of these templates, these commands will get the cluster up and running within 30 seconds:
curl https://raw.githubusercontent.com/Zerpet/docker-rabbitmq-cluster/version/3.7/compose-templates/3-disc-nodes.yml > docker-compose.yml
docker-compose -p my-cluster up -d
The logs of nodes 2 and 3 will show the progress of the initialization process:
docker-compose -p my-cluster logs --follow rabbitmq-server2
The subcommand ps
for Compose will show the status of the containers and the port forwarding:
docker-compose -p my-cluster ps
The management UI is available in all the nodes and it is forwarded to the local ports 15672-15674
.
Checkout the page Environment variables and Templates explained to customize your deployment.
Clean up
Compose offers the command down to stop and remove the containers and network/s created in the project. A command as the following will do a "clean up":
docker-compose -p my-cluster down
If you do not wish to use Compose, check out the page Setup without Compose.