Skip to content

Commit

Permalink
rocketmq 网络类型问题,规范升级
Browse files Browse the repository at this point in the history
  • Loading branch information
dev committed Aug 10, 2021
1 parent 25236c7 commit 3d4319c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 168 deletions.
1 change: 0 additions & 1 deletion config/broker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ fileReservedTime=48
brokerRole=ASYNC_MASTER
flushDiskType=ASYNC_FLUSH
brokerIP1=192.168.0.116
namesrvAddr=localhost:9876
45 changes: 28 additions & 17 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: '3'
services:
mysql:
restart: always
image: mysql
restart: always
container_name: mysql
volumes:
- ../volumes/data/mysqldata:/var/lib/mysql
Expand Down Expand Up @@ -38,8 +38,9 @@ services:
command: redis-server --port 6379 --requirepass lilishop --appendonly yes

elasticsearch:
container_name: elasticsearch
image: elasticsearch:7.3.0
restart: always
container_name: elasticsearch
volumes:
- ../volumes/data/es7/logs:/usr/share/es7/logs:rw
- ../volumes/data/es7/data:/usr/share/es7/data:rw
Expand All @@ -65,6 +66,7 @@ services:

kibana:
image: docker.elastic.co/kibana/kibana:7.3.0
restart: always
container_name: kibana
ports:
- 5601:5601
Expand All @@ -77,6 +79,7 @@ services:

logstash:
image: logstash:7.3.0
restart: always
container_name: logstash
volumes:
- ./config/logstash-springboot.conf:/usr/share/logstash/pipeline/logstash.conf #挂载logstash的配置文件
Expand All @@ -89,51 +92,56 @@ services:
# rocket mq name server
rmqnamesrv:
image: foxiswho/rocketmq:server
restart: always
container_name: rocket-server
network_mode: host
environment:
JAVA_OPT_EXT: "-server -Xms64m -Xmx64m -Xmn64m"
ports:
- 9876:9876
volumes:
- ../volumes/data/rocket/server/logs:/opt/logs
- ../volumes/data/rocket/server/store:/opt/rmqstore

networks:
- rocketmq
ports:
- 9876:9876
# rocket mq broker
rmqbroker:
image: foxiswho/rocketmq:broker
restart: always
container_name: rocket-broker
network_mode: host
ports:
- 10909:10909
- 10911:10911
volumes:
- ../volumes/data/rocket/broker/logs:/opt/logs
- ../volumes/data/rocket/broker/store:/opt/rmqstore
- ./config/broker.conf:/etc/rocketmq/broker.conf
environment:
- NAMESRV_ADDR=localhost:9876
- NAMESRV_ADDR=rmqnamesrv:9876
- JAVA_OPTS:=-Duser.home=/opt
- JAVA_OPT_EXT=-server -Xms64m -Xmx64m -Xmn64m
command: mqbroker -c /etc/rocketmq/broker.conf
depends_on:
- rmqnamesrv
networks:
- rocketmq
ports:
- 10909:10909
- 10911:10911
# rocket console 这个可以不需要
rmqconsole:
image: styletang/rocketmq-console-ng
restart: always
container_name: rocket-console
network_mode: host
ports:
- 8180:8180
environment:
- JAVA_OPTS=-Drocketmq.config.namesrvAddr=localhost:9876 -Dserver.port=8180 -Drocketmq.config.isVIPChannel=false
- JAVA_OPTS=-Drocketmq.config.namesrvAddr=rmqnamesrv:9876 -Dserver.port=8180 -Drocketmq.config.isVIPChannel=false
- JAVA_OPT_EXT=-Xms128m -Xmx128m -Xmn128m
depends_on:
- rmqnamesrv

networks:
- rocketmq
ports:
- 8180:8180
# xxl-job 分布式调度中心
rmqconsole:
xxl-job:
image: xuxueli/xxl-job-admin:2.3.0
restart: always
container_name: xxl-job
network_mode: host
environment:
Expand All @@ -143,5 +151,8 @@ services:
volumes:
- ../volumes/data/xxl-job:/data/applogs
networks:
rocketmq:
driver: bridge
stack:
driver: bridge

150 changes: 0 additions & 150 deletions docker-compose1.yml

This file was deleted.

0 comments on commit 3d4319c

Please sign in to comment.