跳转到主要内容

rabbitmq

docker-compse.yaml

version: '3.3'
services:
  rabbitmq:
    image: rabbitmq:3.8-management
    container_name: rabbitmq    #容器的名字
    restart: always
    environment:
      - RABBITMQ_DEFAULT_USER=rabbitmq  # 默认用户名
      - RABBITMQ_DEFAULT_PASS=<your password> #默认密码
    ports:
      - 15672:5672
      - 25672:15672
    volumes:
      - ./rabbitmq_data:/var/lib/rabbitmq

启动rabbitmq

docker-compose -f docker-compse.yaml up -d