From fa04e992f312cf0f9ff7d3902cf548e52c11c046 Mon Sep 17 00:00:00 2001 From: Kfir Dayan Date: Sat, 8 Jul 2023 10:28:47 +0300 Subject: [PATCH] rabitmq docker added --- infra/docker/.env.example | 4 ++++ infra/docker/docker-compose.yaml | 18 +++++++++++++++++- .../init.js.example | 0 .../redis-init.conf | 0 4 files changed, 21 insertions(+), 1 deletion(-) rename infra/docker/{init-scripts => mongo-init-scripts}/init.js.example (100%) rename infra/docker/{init-scripts => mongo-init-scripts}/redis-init.conf (100%) diff --git a/infra/docker/.env.example b/infra/docker/.env.example index bab9296..454cc70 100644 --- a/infra/docker/.env.example +++ b/infra/docker/.env.example @@ -8,3 +8,7 @@ DB_USERNAME=user DB_PASSWORD=12345 DB_NAME=user_db DB_USER_ROLE=readWrite + +## RABITMQ ## +RABBITMQ_DEFAULT_USER=guest +RABBITMQ_DEFAULT_PASS=guest diff --git a/infra/docker/docker-compose.yaml b/infra/docker/docker-compose.yaml index 9010145..7040782 100644 --- a/infra/docker/docker-compose.yaml +++ b/infra/docker/docker-compose.yaml @@ -7,7 +7,7 @@ services: - 27017:27017 volumes: - mongodb_vol:/data/db - - ./init-scripts/init.js:/docker-entrypoint-initdb.d/mongo-init.js + - ./mongo-init-scripts/init.js:/docker-entrypoint-initdb.d/mongo-init.js environment: - MONGO_INITDB_DATABASE=${MONGO_INITDB_DATABASE} - MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME} @@ -15,5 +15,21 @@ services: platform: linux/arm64/v8 expose: - 27017 + rabitmq: + image: arm64v8/rabbitmq:3.8.3-management + restart: always + ports: + - 5672:5672 + - 15672:15672 + volumes: + - rabbitmq_vol:/var/lib/rabbitmq + environment: + - RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER} + - RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS} + platform: linux/arm64/v8 + expose: + - 5672 + - 15672 volumes: mongodb_vol: + rabbitmq_vol: diff --git a/infra/docker/init-scripts/init.js.example b/infra/docker/mongo-init-scripts/init.js.example similarity index 100% rename from infra/docker/init-scripts/init.js.example rename to infra/docker/mongo-init-scripts/init.js.example diff --git a/infra/docker/init-scripts/redis-init.conf b/infra/docker/mongo-init-scripts/redis-init.conf similarity index 100% rename from infra/docker/init-scripts/redis-init.conf rename to infra/docker/mongo-init-scripts/redis-init.conf