# Docker-compose 安装 RabbitMQ
rabbitmq yaml 配置文件
version: "3.0" services: rabbitmq: image: daocloud.io/library/rabbitmq:3.8.7 container_name: rabbitmq restart: always volumes: - ./data/:/var/lib/rabbitmq/ ports: - 5672:5672 - 15672:15672
1
2
3
4
5
6
7
8
9
10
11rabbitmq授权
rabbitmqctl add_user root qwe123 rabbitmqctl set_permissions -p / root ".*" ".*" ".*" rabbitmqctl set_user_tags root administrator
1
2
3第三方服务进行连接
AMQP_URI=amqp://root:qwe123@IP地址:5672
1