使用docker-compose编排部署rabbitMq消息队列

version: '2'
services:
  rabbitmq:
    hostname: rabbitmq
    environment:
      RABBITMQ_DEFAULT_VHOST: "XXX"
      RABBITMQ_DEFAULT_USER: "root"
      RABBITMQ_DEFAULT_PASS: "123456"
    image: "rabbitmq:3.7.16-management"
    restart: always
    volumes:
    - "./data:/usr/local/rabbitMq/data"
    - "./log:/usr/local/rabbitMq/log"
    ports:
    - "15672:15672"
    - "4369:4369"
    - "5672:5672"
    - "25672:25672"

你可能感兴趣的:(学习笔记)