diff --git a/README.md b/README.md index b5870e1..9fd1ccb 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,18 @@ There are a lots of good options if you want to run a [RabbitMQ](https://hub.doc The main benifit with this approach is that you can use [any version](https://hub.docker.com/r/library/rabbitmq/tags/) of RabbitMQ, which is maintaied by docker and will be up-to-date with future releases. +## Linefeed issues with Git on Windows + +If you configured your system using CRLF as default, you may change line-endings to LF manually. + +When docker tries to mount the file `cluster-entrypoint.sh` into the containers, linux may fail executing this file, resulting in node-1 and node-2 not running. + +Here is how you can configure "LF" to be the default in Windows: +``` +git config --global core.autocrlf false +git config --global core.eol lf +``` + ## Install ``` diff --git a/cluster-entrypoint.sh b/cluster-entrypoint.sh index 2c29a55..0dffae4 100755 --- a/cluster-entrypoint.sh +++ b/cluster-entrypoint.sh @@ -7,6 +7,9 @@ set -e # will be honored /usr/local/bin/docker-entrypoint.sh rabbitmq-server -detached +# Wait a moment until the server was started initially +sleep 5s + # Do the cluster dance rabbitmqctl stop_app rabbitmqctl join_cluster rabbit@rabbitmq1 diff --git a/docker-compose.yml b/docker-compose.yml index 4ba9561..85e5f60 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,5 @@ version: '3' - services: - rabbitmq1: image: rabbitmq:3-management hostname: rabbitmq1