From cd5a91785ba98d5f41d188b6ddab4f747144d9d6 Mon Sep 17 00:00:00 2001 From: BryantHe Date: Mon, 5 Feb 2024 15:59:53 +0800 Subject: [PATCH] fix: rabbitmq adjust --- docker-compose-rabbitmq.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/docker-compose-rabbitmq.yml b/docker-compose-rabbitmq.yml index 130ff2c..febaa4b 100644 --- a/docker-compose-rabbitmq.yml +++ b/docker-compose-rabbitmq.yml @@ -3,7 +3,6 @@ version: "3.8" services: rabbitmq: image: rabbitmq:3-management - container_name: 'rabbitmq' hostname: 'rabbitmq' ports: - "5672:5672" @@ -15,9 +14,20 @@ services: environment: RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER:-admin} RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS:-admin} - restart: always + deploy: + resources: + reservations: + cpus: '0.10' + memory: 100M + limits: + cpus: '0.35' + memory: 500M + update_config: + failure_action: rollback + placement: + constraints: + - 'node.role == manager' networks: - - rabbitmq_network - diyue-network @@ -28,8 +38,6 @@ volumes: driver: local networks: - rabbitmq_network: - driver: bridge diyue-network: driver: overlay attachable: true \ No newline at end of file