我需要在docker中运行web服务之前向rabbitmq添加三个交换。我的docker-compose.yml如下所示:
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'
是否有任何想法将交换添加到yml脚本中?交换名称为dataproc
,dataproc_output
和mlearning
答案 0 :(得分:0)
似乎有两种方法可以解决这个问题:
选项#2对我更有吸引力,因为配置是通过REST调用执行的。