From e3698f36265f086662da68f46dc6810b51ea9d2c Mon Sep 17 00:00:00 2001 From: Oliver Atkinson Date: Fri, 22 Dec 2023 13:33:06 -0700 Subject: [PATCH] working --- Rabbitmq/Dockerfile | 18 ++++++++++++++++++ Rabbitmq/docker-compose.yml | 12 ++++++++---- Rabbitmq/rabbitmq.conf | 0 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 Rabbitmq/Dockerfile create mode 100644 Rabbitmq/rabbitmq.conf diff --git a/Rabbitmq/Dockerfile b/Rabbitmq/Dockerfile new file mode 100644 index 0000000..f8ae7a3 --- /dev/null +++ b/Rabbitmq/Dockerfile @@ -0,0 +1,18 @@ +# 3.13 management +FROM rabbitmq:3.13-rc + +RUN set eux; \ + rabbitmq-plugins enable --offline rabbitmq_management; \ +# make sure the metrics collector is re-enabled (disabled in the base image for Prometheus-style metrics by default) + rm -f /etc/rabbitmq/conf.d/20-management_agent.disable_metrics_collector.conf; \ +# grab "rabbitmqadmin" from inside the "rabbitmq_management-X.Y.Z" plugin folder +# see https://github.com/docker-library/rabbitmq/issues/207 + cp /plugins/rabbitmq_management-*/priv/www/cli/rabbitmqadmin /usr/local/bin/rabbitmqadmin; \ + [ -s /usr/local/bin/rabbitmqadmin ]; \ + chmod +x /usr/local/bin/rabbitmqadmin; \ + apt-get update; \ + apt-get install -y --no-install-recommends python3; \ + rm -rf /var/lib/apt/lists/*; \ + rabbitmqadmin --version + +EXPOSE 15671 15672 diff --git a/Rabbitmq/docker-compose.yml b/Rabbitmq/docker-compose.yml index e124273..218a812 100644 --- a/Rabbitmq/docker-compose.yml +++ b/Rabbitmq/docker-compose.yml @@ -2,13 +2,17 @@ version: '3' services: rabbitmq: - image: rabbitmq:latest + build: ./ restart: unless-stopped container_name: rabbitmq + # Configuration + # https://www.rabbitmq.com/configure.html + volumes: + - ./rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf security_opt: - no-new-privileges:true - environment: - - RABBITMQ_DEFAULT_USER=username - - RABBITMQ_DEFAULT_PASS=password + ports: + # Web-management + - 8080:15672 diff --git a/Rabbitmq/rabbitmq.conf b/Rabbitmq/rabbitmq.conf new file mode 100644 index 0000000..e69de29