docker-compose 部署jdk+redis+rocketmq

version: "3"
services:
jdk11:
image: jdk11:11
tty: true
container_name: jdk11
ports:
- "8080:8080"
volumes:
- "/jdk11/www:/jar"
redis:
image: redis:6.2.3
container_name: redis
command: redis-server /etc/redis/redis.conf
ports:
- "6379:6379"
volumes:
- "/jdk11/redis/redis.conf:/etc/redis/redis.conf"
rmqnamesrv:
image: rocketmqinc/rocketmq:4.3.2
container_name: rmqnamesrv
ports:
- "9876:9876"
volumes:
- "/jdk11/rocketmq/nameservice/logs:/home/rocketmq/logs/rocketmqlogs"
command: sh mqnamesrv
rmqbroker:
image: rocketmqinc/rocketmq:4.3.2
container_name: rmqbroker
links:
- rmqnamesrv
ports:
- "10909:10909"
- "10911:10911"
- "10912:10912"
volumes:
- "/jdk11/rocketmq/broker/logs:/home/rocketmq/logs/rocketmqlogs"
- "/jdk11/rocketmq/broker/broker.conf:/opt/rocketmq-4.3.2/conf/broker.conf"
#- "/jdk11/rocketmq/broker/store:/opt/store"
command: sh mqbroker -c /opt/rocketmq-4.3.2/conf/broker.conf
environment:
NAMESRV_ADDR: rmqnamesrv:9876
JAVA_OPT_EXT: "-server -Xms200m -Xmx200m -Xmn200m"
depends_on:
- rmqnamesrv
rmqconsole:
image: styletang/rocketmq-console-ng:1.0.0
restart: always
container_name: rmqconsole
ports:
- 8180:8080
environment:
JAVA_OPTS: "-Drocketmq.namesrv.addr=rmqnamesrv:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false"
depends_on:
- rmqnamesrv

posted on 2021-05-28 12:00  南山以南丶  阅读(247)  评论(0编辑  收藏  举报

导航