安装脚本
使用官方镜像4.9.1版本部署
version: '3.8'
services:
rmqnamesrv:
image: apache/rocketmq:4.9.1
container_name: rmqnamesrv
ports:
- 9876:9876
volumes:
- ./rmqnamesrv/logs:/home/rocketmq/logs
environment:
JAVA_OPT_EXT: "-Duser.home=/home/rocketmq -Xms512M -Xmx512M -Xmn128m"
command: ["sh","mqnamesrv"]
broker:
image: apache/rocketmq:4.9.1
container_name: rmqbroker
ports:
- 10909:10909
- 10911:10911
- 10912:10912
volumes:
- ./rmqbroker/logs:/home/rocketmq/logs
- ./rmqbroker/store:/home/rocketmq/store
- ./rmqbroker/brokerconf/broker.conf:/home/rocketmq/rocketmq-4.9.1/conf/broker.conf
links:
- rmqnamesrv:namesrv
environment:
NAMESRV_ADDR: namesrv:9876
JAVA_OPT_EXT: "-Duser.home=/home/rocketmq -Xms512M -Xmx512M -Xmn128m"
command: ["sh","mqbroker","-c","../conf/broker.conf","autoCreateTopicEnable=true"]
rmqdashboard:
image: apacherocketmq/rocketmq-dashboard:latest
container_name: rocketmq-dashboard
ports:
- 8080:8080
environment:
JAVA_OPTS: "-Drocketmq.namesrv.addr=namesrv:9876"
links:
- rmqnamesrv:namesrv