services:
  rabbitmq:
    build: ./docker
    container_name: bunny_rabbitmq
    environment:
      RABBITMQ_NODENAME: bunny
      # see CONTRIBUTING.md
      BUNNY_RABBITMQ_HOSTNAME: mercurio
      # link to spec specific configuration
      RABBITMQ_CONFIG_FILE: /spec/config/rabbitmq.conf
      RABBITMQ_ENABLED_PLUGINS_FILE: /spec/config/enabled_plugins
      # send logs to stdout
      RABBITMQ_LOGS: '-'
      RABBITMQ_SASL_LOGS: '-'
    ports:
      - 5671-5672:5671-5672
      - 15672:15672
    volumes:
      - ./spec:/spec:ro
  toxiproxy:
    container_name: toxiproxy
    image: shopify/toxiproxy
    ports:
      - 8474:8474
      - 11111:11111
    depends_on:
      - rabbitmq
