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:
反编译工作区
2026-05-01 22:51:33 +08:00
parent fa6f5fad37
commit 65fb32d97f
2 changed files with 17 additions and 8 deletions
+16 -7
View File
@@ -20,6 +20,16 @@ services:
- "6379:6379"
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:
image: confluentinc/cp-kafka:7.5.0
container_name: v2test-kafka
@@ -27,15 +37,14 @@ services:
ports:
- "9092:9092"
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: "broker,controller"
KAFKA_CONTROLLER_QUORUM_VOTERS: "1@localhost:9093"
KAFKA_LISTENERS: "PLAINTEXT://:9092,CONTROLLER://:9093"
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://localhost:9092"
KAFKA_CONTROLLER_LISTENER_NAMES: "CONTROLLER"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT"
KAFKA_LISTENERS: "PLAINTEXT://:9092"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
CLUSTER_ID: "v2test-cluster-001"
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
depends_on:
- zookeeper
nginx:
image: nginx:alpine