使用 Docker 搭建 RabbitMQ

rabbitmq-logo

compose file

version: "3.4"

services:
  rabbitmq-docker:
    image: rabbitmq:3.8.2-management
    container_name: rabbitmq-docker
    hostname: rabbitmq
    environment:
      - RABBITMQ_DEFAULT_USER=admin
      - RABBITMQ_DEFAULT_PASS=admin
    ports:
      - "5672:5672"
      - "15672:15672"
    volumes:
      - "rabbitmq:/var/lib/rabbitmq/mnesia"  # 挂载数据目录
volumes:
	rabbitmq:

15672 是 Web 管理页面的端口:http://localhost:15672/

posted @ 2020-04-15 11:58  浮云Cloud  阅读(586)  评论(0编辑  收藏  举报