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