fix: rabbitmq adjust

This commit is contained in:
BryantHe 2024-02-05 15:59:53 +08:00
parent 4aea4f36f1
commit cd5a91785b
1 changed files with 13 additions and 5 deletions

View File

@ -3,7 +3,6 @@ version: "3.8"
services: services:
rabbitmq: rabbitmq:
image: rabbitmq:3-management image: rabbitmq:3-management
container_name: 'rabbitmq'
hostname: 'rabbitmq' hostname: 'rabbitmq'
ports: ports:
- "5672:5672" - "5672:5672"
@ -15,9 +14,20 @@ services:
environment: environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER:-admin} RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER:-admin}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS:-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: networks:
- rabbitmq_network
- diyue-network - diyue-network
@ -28,8 +38,6 @@ volumes:
driver: local driver: local
networks: networks:
rabbitmq_network:
driver: bridge
diyue-network: diyue-network:
driver: overlay driver: overlay
attachable: true attachable: true