From 6564ab4acb5c8c3530f9a727dea13e146f90bd47 Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Thu, 18 Sep 2014 15:30:23 -0400 Subject: [PATCH] added rabbitmq --- docker/rabbitmq/Dockerfile | 8 ++++++++ docker/rabbitmq/rabbitmq-env.conf | 3 +++ docker/rabbitmq/rabbitmq.config | 11 +++++++++++ docker/rabbitmq/start.sh | 19 +++++++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 docker/rabbitmq/Dockerfile create mode 100644 docker/rabbitmq/rabbitmq-env.conf create mode 100644 docker/rabbitmq/rabbitmq.config create mode 100755 docker/rabbitmq/start.sh diff --git a/docker/rabbitmq/Dockerfile b/docker/rabbitmq/Dockerfile new file mode 100644 index 0000000000..6d976a9552 --- /dev/null +++ b/docker/rabbitmq/Dockerfile @@ -0,0 +1,8 @@ +FROM rhel7 +MAINTAINER Lars Kellogg-Stedman + +RUN yum -y install rabbitmq-server; yum clean all +ADD rabbitmq.config /etc/rabbitmq/ +ADD rabbitmq-env.conf /etc/rabbitmq/ +ADD start.sh /start.sh +CMD ["/start.sh"] diff --git a/docker/rabbitmq/rabbitmq-env.conf b/docker/rabbitmq/rabbitmq-env.conf new file mode 100644 index 0000000000..c2b843e5ed --- /dev/null +++ b/docker/rabbitmq/rabbitmq-env.conf @@ -0,0 +1,3 @@ +RABBITMQ_NODE_PORT=@RABBITMQ_PORT@ +RABBITMQ_LOG_BASE=@RABBITMQ_LOG_BASE@ + diff --git a/docker/rabbitmq/rabbitmq.config b/docker/rabbitmq/rabbitmq.config new file mode 100644 index 0000000000..15a47eba18 --- /dev/null +++ b/docker/rabbitmq/rabbitmq.config @@ -0,0 +1,11 @@ +[ + {rabbit, [ + {default_user, <<"@RABBITMQ_USER@">>}, + {default_pass, <<"@RABBITMQ_PASS@">>} + ]}, + {kernel, [ + + ]} +]. +% EOF + diff --git a/docker/rabbitmq/start.sh b/docker/rabbitmq/start.sh new file mode 100755 index 0000000000..36e6e266a7 --- /dev/null +++ b/docker/rabbitmq/start.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +: ${RABBITMQ_USER:=guest} +: ${RABBITMQ_PASS:=guest} +: ${RABBITMQ_PORT:=5672} +: ${RABBITMQ_LOG_BASE:=/var/log/rabbitmq} + +sed -i ' + s|@RABBITMQ_USER@|'"$RABBITMQ_USER"'|g + s|@RABBITMQ_PASS@|'"$RABBITMQ_PASS"'|g +' /etc/rabbitmq/rabbitmq.config + +sed -i ' + s|@RABBITMQ_PORT@|'"$RABBITMQ_PORT"'|g + s|@RABBITMQ_LOG_BASE@|'"$RABBITMQ_LOG_BASE"'|g +' /etc/rabbitmq/rabbitmq-env.conf + +exec /usr/lib/rabbitmq/bin/rabbitmq-server +