Skip to content

Commit

Permalink
Merge branch 'master' into rabbitmq-3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
HariSekhon committed Apr 18, 2020
2 parents bd9f4ca + 60334c1 commit 820a8ce
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rabbitmq-cluster/Dockerfile
Expand Up @@ -20,10 +20,10 @@ LABEL Description="RabbitMQ Cluster" \
"RabbitMQ Version"="$RABBITMQ_VERSION"

COPY entrypoint.sh /
COPY rabbitmq-cluster /usr/bin
COPY rabbitmq-cluster /

EXPOSE 15672

ENTRYPOINT ["/entrypoint.sh"]

CMD ["rabbitmq-cluster"]
CMD ["/rabbitmq-cluster"]
15 changes: 13 additions & 2 deletions rabbitmq-cluster/rabbitmq-cluster
Expand Up @@ -53,8 +53,19 @@ else
if [ -n "$RAM" ]; then
echo "will configure as a ram node"
fi
# do not quote $RAM - when it's empty passing "" breaks the join_cluster command
rabbitmqctl join_cluster "$RABBITMQ_NODE"@"$RABBITMQ_CLUSTER_SEED" $RAM
count=0
while true; do
((count+=1))
# do not quote $RAM - when it's empty passing "" breaks the join_cluster command
if rabbitmqctl join_cluster "$RABBITMQ_NODE"@"$RABBITMQ_CLUSTER_SEED" $RAM; then
break
fi
if [ $count -ge 20 ]; then
exit 1
fi
# give seed node some time to start if needed
sleep 10
done
echo "starting cluster node"
rabbitmqctl start_app
tail -f /dev/null /var/log/rabbitmq/*
Expand Down

0 comments on commit 820a8ce

Please sign in to comment.