added rabbitmq

This commit is contained in:
Lars Kellogg-Stedman 2014-09-18 15:30:23 -04:00
parent 1393e1da90
commit 6564ab4acb
4 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,8 @@
FROM rhel7
MAINTAINER Lars Kellogg-Stedman <lars@redhat.com>
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"]

View File

@ -0,0 +1,3 @@
RABBITMQ_NODE_PORT=@RABBITMQ_PORT@
RABBITMQ_LOG_BASE=@RABBITMQ_LOG_BASE@

View File

@ -0,0 +1,11 @@
[
{rabbit, [
{default_user, <<"@RABBITMQ_USER@">>},
{default_pass, <<"@RABBITMQ_PASS@">>}
]},
{kernel, [
]}
].
% EOF

19
docker/rabbitmq/start.sh Executable file
View File

@ -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