Commit 6229230e by 仲光辉

style: add docker port mapping about kafka JMX

parent f82d6c8a
...@@ -8,18 +8,19 @@ services: ...@@ -8,18 +8,19 @@ services:
container_name: kafka01 container_name: kafka01
ports: ports:
- "9092:9092" - "9092:9092"
- "9999:9999"
environment: environment:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://192.168.128.3:9092 KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://192.168.128.3:9092
KAFKA_ADVERTISED_HOST_NAME: 192.168.128.3 KAFKA_ADVERTISED_HOST_NAME: 192.168.128.3
KAFKA_ADVERTISED_PORT: 9092 KAFKA_ADVERTISED_PORT: 9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper01:2181,zookeeper02:2181,zookeeper03:2181 KAFKA_ZOOKEEPER_CONNECT: zookeeper01:2181,zookeeper02:2181,zookeeper03:2181
JMX_PORT: 9999 JMX_PORT: 9999
volumes: volumes:
- ./kafka01/logs:/kafka - ./kafka01/logs:/kafka
external_links: external_links:
- zookeeper01 - zookeeper01
- zookeeper02 - zookeeper02
- zookeeper03 - zookeeper03
networks: networks:
default: default:
ipv4_address: 172.128.0.20 ipv4_address: 172.128.0.20
...@@ -31,18 +32,19 @@ services: ...@@ -31,18 +32,19 @@ services:
container_name: kafka02 container_name: kafka02
ports: ports:
- "9093:9092" - "9093:9092"
- "9988:9988"
environment: environment:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://192.168.128.3:9093 KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://192.168.128.3:9093
KAFKA_ADVERTISED_HOST_NAME: 192.168.128.3 KAFKA_ADVERTISED_HOST_NAME: 192.168.128.3
KAFKA_ADVERTISED_PORT: 9093 KAFKA_ADVERTISED_PORT: 9093
KAFKA_ZOOKEEPER_CONNECT: zookeeper01:2181,zookeeper02:2181,zookeeper03:2181 KAFKA_ZOOKEEPER_CONNECT: zookeeper01:2181,zookeeper02:2181,zookeeper03:2181
JMX_PORT: 9988 JMX_PORT: 9988
volumes: volumes:
- ./kafka02/logs:/kafka - ./kafka02/logs:/kafka
external_links: external_links:
- zookeeper01 - zookeeper01
- zookeeper02 - zookeeper02
- zookeeper03 - zookeeper03
networks: networks:
default: default:
ipv4_address: 172.128.0.21 ipv4_address: 172.128.0.21
...@@ -54,6 +56,7 @@ services: ...@@ -54,6 +56,7 @@ services:
container_name: kafka03 container_name: kafka03
ports: ports:
- "9094:9092" - "9094:9092"
- "9977:9977"
environment: environment:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://192.168.128.3:9094 KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://192.168.128.3:9094
KAFKA_ADVERTISED_HOST_NAME: 192.168.128.3 KAFKA_ADVERTISED_HOST_NAME: 192.168.128.3
...@@ -62,14 +65,14 @@ services: ...@@ -62,14 +65,14 @@ services:
JMX_PORT: 9977 JMX_PORT: 9977
volumes: volumes:
- ./kafka03/logs:/kafka - ./kafka03/logs:/kafka
external_links: external_links:
- zookeeper01 - zookeeper01
- zookeeper02 - zookeeper02
- zookeeper03 - zookeeper03
networks: networks:
default: default:
ipv4_address: 172.128.0.22 ipv4_address: 172.128.0.22
networks: networks:
default: default:
external: external:
name: zookeeper_network name: zookeeper_network
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment