feat: Bootstrap durable RabbitMQ queue (U1)

This commit is contained in:
Самохвалов Андрей Ремович
2026-10-02 13:28:26 +03:00
parent a96711a51a
commit af7213900b
6 changed files with 153 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
# Independent broker bootstrap fragment. Merge these roles into compose.yaml
# when the lab4 application base is ready.
services:
broker:
image: rabbitmq:4.1.8-management
hostname: broker
restart: unless-stopped
volumes:
- broker_data:/var/lib/rabbitmq
- ./secrets/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 5s
timeout: 5s
retries: 24
networks: [backend]
broker-init:
image: python:3.12.14-alpine3.24
restart: "no"
depends_on:
broker:
condition: service_healthy
environment:
BROKER_URL_FILE: /run/secrets/broker_url
volumes:
- ./scripts/bootstrap_broker.py:/app/bootstrap_broker.py:ro
- ./secrets/broker_url:/run/secrets/broker_url:ro
command: ["python", "/app/bootstrap_broker.py"]
networks: [backend]
networks:
backend:
volumes:
broker_data: