DAS_2024_1/kalyshev_yan_lab_4/docker-compose.yml
2024-11-08 01:04:56 +04:00

56 lines
1007 B
YAML

services:
rabbit:
container_name: rabbit
image: rabbitmq:3-management
ports:
- "15672:15672"
- "5672:5672"
- "5671:5671"
networks:
- rabbit
publisher:
build: ./publisher-app
container_name: publisher
depends_on:
- rabbit
environment:
RABBIT_HOST: rabbit
RABBIT_PORT: 5672
networks:
- rabbit
consumer-1:
build: ./consumer-app
depends_on:
- rabbit
- publisher
environment:
RABBIT_HOST: rabbit
RABBIT_PORT: 5672
PROCESS_DELAY: 3000
QUEUE_NAME: queue1
EXCHANGE_NAME: software-events
deploy:
replicas: 3
networks:
- rabbit
consumer-2:
build: ./consumer-app
container_name: consumer-2
depends_on:
- rabbit
- publisher
environment:
RABBIT_HOST: rabbit
RABBIT_PORT: 5672
PROCESS_DELAY: 0
QUEUE_NAME: queue2
EXCHANGE_NAME: software-events
networks:
- rabbit
networks:
rabbit: