
version: "3.7"

networks:
  mother:
    external: true

services:
  rabbitmq:
    image: registry.vnfco.ir/library/bitnami/rabbitmq:latest
    ports:
      - '5672'
    environment:
      - RABBITMQ_PASSWORD=muyXHzymcTYLzk3wYnIwG+UJWECKy0ViUDO+UlCmPF3XS+2kliuV0TaA0mWf6lT
      - RABBITMQ_USERNAME=igarsonAgent
    volumes:
      - '/volume/rabbit:/bitnami'
    deploy:
      update_config:
        parallelism: 1
        delay: 10s
        order: start-first
      restart_policy:
        condition: any
        delay: 5s
        window: 120s 
      resources:
        limits:
          cpus: '0.7'
          memory: 350M
      replicas: 1
      mode: replicated
    networks:
      - mother
    healthcheck:
      test: ["CMD", "rabbitmqctl", "status"]
      interval: 10s
      timeout: 5s
      retries: 3
      start_period: 5s