3

I need to add three exchanges into rabbitmq before the web service run in docker. My docker-compose.yml is like below:

version: '3'

services:
  web:
    build: .
    command: python manage.py runserver 0.0.0.0:9070
    volumes:
      - .:/code
    ports:
      - "9070:8000"

    depends_on:
      -redis
      -rabbitmq

    links:
      - rabbitmq
      - redis

  redis:
    image: redis:latest

  rabbitmq:
    image: rabbitmq:3-management
    ports:
      - "5672:5672"  # we forward this port because it's useful for debugging
      - "15672:15672"  # here, we can access rabbitmq management plugin'

Any idea to add the exchange into the yml script? The exchange name will be dataproc, dataproc_output and mlearning

Mervyn Lee
  • 1,957
  • 4
  • 28
  • 54
  • Did you manage to make this work? – SkarXa Jan 30 '18 at 18:09
  • 1
    @SkarXa From what I remembered, I just have to access it from localhost:15672 in browser since they are mapped `- "15672:15672" ` and declare exchanges. This is how I solved it. – Mervyn Lee Jan 31 '18 at 03:24

1 Answers1

1

There seems to be two ways to address this issue:

Option #2 appeals to me more, as the configuration is performed via REST calls.

Dan M
  • 1,175
  • 12
  • 23