Skip to content

Commit c54774a

Browse files
authored
Merge pull request #2112 from Websoft9/fix/rocketmq
feat: update rocketmq compose configuration
2 parents ca8de53 + a63d02a commit c54774a

6 files changed

Lines changed: 46 additions & 8 deletions

File tree

apps/rocketmq/.env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
W9_VERSION='5.3.1'
2+
W9_DASHBOARD_VERSION='2.1.0'
23
W9_DIST='community'
34
W9_REPO=apache/rocketmq
45

56
#### -- Not allowed to edit below environments when recreate app based on existing data -- ####
67
W9_ID='rocketmq'
8+
W9_NAMESRV_PORT_SET='9876'
9+
W9_BROKER_VIP_PORT_SET='10909'
10+
W9_BROKER_PORT_SET='10911'
11+
W9_BROKER_HA_PORT_SET='10912'
712
W9_PROXY_REMOTING_PORT_SET='8080'
813
W9_PROXY_GRPC_PORT_SET='8081'
14+
W9_DASHBOARD_PORT_SET='8090'
915
W9_NETWORK=websoft9
1016
#### --------------------------------------------------------------------------------------- ####

apps/rocketmq/Notes.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
## RocketMQ

apps/rocketmq/docker-compose.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,26 @@ services:
88
image: ${W9_REPO}:${W9_VERSION}
99
container_name: ${W9_ID}-nameserver
1010
restart: unless-stopped
11-
# ports:
12-
# - 9876:9876
11+
ports:
12+
- ${W9_NAMESRV_PORT_SET}:9876
1313
command: sh mqnamesrv
1414

1515
broker:
1616
image: ${W9_REPO}:${W9_VERSION}
1717
container_name: ${W9_ID}-broker
1818
restart: unless-stopped
19-
# ports:
20-
# - 10909:10909
21-
# - 10911:10911
22-
# - 10912:10912
19+
ports:
20+
- ${W9_BROKER_VIP_PORT_SET}:10909
21+
- ${W9_BROKER_PORT_SET}:10911
22+
- ${W9_BROKER_HA_PORT_SET}:10912
2323
environment:
2424
- NAMESRV_ADDR=${W9_ID}-nameserver:9876
25+
volumes:
26+
- rocketmq_home:/home/rocketmq
27+
- ./src/broker.conf:/home/rocketmq/rocketmq-${W9_VERSION}/conf/broker.conf
2528
depends_on:
2629
- namesrv
27-
command: sh mqbroker
30+
command: sh mqbroker -c /home/rocketmq/rocketmq-${W9_VERSION}/conf/broker.conf
2831

2932
proxy:
3033
image: ${W9_REPO}:${W9_VERSION}
@@ -40,6 +43,20 @@ services:
4043
environment:
4144
- NAMESRV_ADDR=${W9_ID}-nameserver:9876
4245
command: sh mqproxy
46+
47+
dashboard:
48+
image: apacherocketmq/rocketmq-dashboard:${W9_DASHBOARD_VERSION}
49+
container_name: ${W9_ID}-dashboard
50+
depends_on:
51+
- namesrv
52+
ports:
53+
- ${W9_DASHBOARD_PORT_SET}:8082
54+
restart: unless-stopped
55+
environment:
56+
- JAVA_OPTS=-Drocketmq.namesrv.addr=${W9_ID}-nameserver:9876
57+
58+
volumes:
59+
rocketmq_home:
4360

4461
networks:
4562
default:

apps/rocketmq/src/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# About
22

33
This folder includes files mount to container and used by Websoft9
4+
5+
- `broker.conf`: RocketMQ broker config mounted to `/home/rocketmq/rocketmq-${W9_VERSION}/conf/broker.conf`

apps/rocketmq/src/broker.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
brokerClusterName=DefaultCluster
2+
brokerName=broker-a
3+
brokerId=0
4+
deleteWhen=04
5+
fileReservedTime=48
6+
brokerRole=ASYNC_MASTER
7+
flushDiskType=ASYNC_FLUSH
8+
9+
# Replace with the actual host/public IP when not running a local quickstart.
10+
#brokerIP1=127.0.0.1

i18n/translation.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,5 +438,9 @@
438438
"W9_SMTP_PORT_SET": [
439439
"SMTP PORT",
440440
"SMTP 端口"
441+
],
442+
"W9_BRIDGE_PORT_SET": [
443+
"",
444+
""
441445
]
442446
}

0 commit comments

Comments
 (0)