mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 08:20:31 +08:00
fix: restore ZK, use confluentinc/cp-zookeeper:7.5.0 + cp-kafka:7.5.0 (both locally available)
Former-commit-id: 8fffa72c508a4008e2d7790a307eb1e2e4602cde
This commit is contained in:
@@ -20,6 +20,16 @@ services:
|
|||||||
- "6379:6379"
|
- "6379:6379"
|
||||||
command: redis-server --requirepass "1qaz!QAZ"
|
command: redis-server --requirepass "1qaz!QAZ"
|
||||||
|
|
||||||
|
zookeeper:
|
||||||
|
image: confluentinc/cp-zookeeper:7.5.0
|
||||||
|
container_name: v2test-zookeeper
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "2181:2181"
|
||||||
|
environment:
|
||||||
|
ZOOKEEPER_CLIENT_PORT: 2181
|
||||||
|
ZOOKEEPER_TICK_TIME: 2000
|
||||||
|
|
||||||
kafka:
|
kafka:
|
||||||
image: confluentinc/cp-kafka:7.5.0
|
image: confluentinc/cp-kafka:7.5.0
|
||||||
container_name: v2test-kafka
|
container_name: v2test-kafka
|
||||||
@@ -27,15 +37,14 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "9092:9092"
|
- "9092:9092"
|
||||||
environment:
|
environment:
|
||||||
KAFKA_NODE_ID: 1
|
KAFKA_BROKER_ID: 1
|
||||||
KAFKA_PROCESS_ROLES: "broker,controller"
|
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
|
||||||
KAFKA_CONTROLLER_QUORUM_VOTERS: "1@localhost:9093"
|
|
||||||
KAFKA_LISTENERS: "PLAINTEXT://:9092,CONTROLLER://:9093"
|
|
||||||
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://localhost:9092"
|
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://localhost:9092"
|
||||||
KAFKA_CONTROLLER_LISTENER_NAMES: "CONTROLLER"
|
KAFKA_LISTENERS: "PLAINTEXT://:9092"
|
||||||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT"
|
|
||||||
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|
||||||
CLUSTER_ID: "v2test-cluster-001"
|
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
|
||||||
|
depends_on:
|
||||||
|
- zookeeper
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:alpine
|
image: nginx:alpine
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ log_ok "MySQL: $MYSQL_HOST:$MYSQL_PORT OK"
|
|||||||
|
|
||||||
# 端口冲突
|
# 端口冲突
|
||||||
CONFLICT_PORTS=""
|
CONFLICT_PORTS=""
|
||||||
for port in 8500 6379 9092 8090 18080 18081 16106 17011 3721; do
|
for port in 8500 6379 9092 2181 8090 18080 18081 16106 17011 3721; do
|
||||||
if ss -tlnp 2>/dev/null | grep -q ":$port "; then
|
if ss -tlnp 2>/dev/null | grep -q ":$port "; then
|
||||||
CONFLICT_PORTS="$CONFLICT_PORTS $port"
|
CONFLICT_PORTS="$CONFLICT_PORTS $port"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user