一键运行RocketMQ5.3和Dashboard
目录
- 一键运行RocketMQ5.3和Dashboard
-
- [通过Docker Compose 来一键启动](#通过Docker Compose 来一键启动)
- 参考信息
通过Docker Compose 来一键启动
运行的容器包括
- NameServer
- Broker
- Proxy
- DashBoard
docker-compose.yml文件
- 这个yml文件比官网部署文档多了一个DashBoard部分
yaml
# version: '3.8'
services:
namesrv:
image: apache/rocketmq:5.3.0
container_name: rmqnamesrv
ports:
- 9876:9876
networks:
- rocketmq
command: sh mqnamesrv
broker:
image: apache/rocketmq:5.3.0
container_name: rmqbroker
ports:
- 10909:10909
- 10911:10911
- 10912:10912
environment:
- NAMESRV_ADDR=rmqnamesrv:9876
depends_on:
- namesrv
networks:
- rocketmq
command: sh mqbroker
proxy:
image: apache/rocketmq:5.3.0
container_name: rmqproxy
networks:
- rocketmq
depends_on:
- broker
- namesrv
ports:
- 8080:8080
- 8081:8081
restart: on-failure
environment:
- NAMESRV_ADDR=rmqnamesrv:9876
command: sh mqproxy
rocketmq-dashboard:
image: apacherocketmq/rocketmq-dashboard:latest
container_name: rmdashboard
networks:
- rocketmq
depends_on:
- broker
- namesrv
- proxy
ports:
- 8008:8080
environment:
- JAVA_OPTS=-Drocketmq.namesrv.addr=rmqnamesrv:9876
networks:
rocketmq:
driver: bridge
运行命令启动
bash
docker-compose up -d
本地效果查看
- 浏览器输入: http://localhost:8008/