63 lines
1.3 KiB
YAML
63 lines
1.3 KiB
YAML
|
|
version: "3.8"
|
||
|
|
|
||
|
|
networks:
|
||
|
|
1panel-network:
|
||
|
|
external: true
|
||
|
|
|
||
|
|
services:
|
||
|
|
# Redpanda Kafka 消息队列
|
||
|
|
redpanda:
|
||
|
|
image: redpandadata/redpanda:latest
|
||
|
|
container_name: wwjcloud-redpanda
|
||
|
|
command:
|
||
|
|
- redpanda
|
||
|
|
- start
|
||
|
|
- --overprovisioned
|
||
|
|
- --smp
|
||
|
|
- "1"
|
||
|
|
- --memory
|
||
|
|
- 1G
|
||
|
|
- --reserve-memory
|
||
|
|
- 0M
|
||
|
|
- --node-id
|
||
|
|
- "0"
|
||
|
|
- --check=false
|
||
|
|
- --kafka-addr
|
||
|
|
- PLAINTEXT://0.0.0.0:9092,INTERNAL://0.0.0.0:9093
|
||
|
|
- --advertise-kafka-addr
|
||
|
|
- PLAINTEXT://192.168.1.35:9092,INTERNAL://redpanda:9093
|
||
|
|
ports:
|
||
|
|
- "9092:9092"
|
||
|
|
- "9093:9093"
|
||
|
|
- "9644:9644"
|
||
|
|
volumes:
|
||
|
|
- redpanda_data:/var/lib/redpanda/data
|
||
|
|
networks:
|
||
|
|
- 1panel-network
|
||
|
|
restart: unless-stopped
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD", "rpk", "cluster", "health"]
|
||
|
|
interval: 30s
|
||
|
|
timeout: 10s
|
||
|
|
retries: 3
|
||
|
|
|
||
|
|
# Kafka UI 管理界面
|
||
|
|
kafka-ui:
|
||
|
|
image: provectuslabs/kafka-ui:latest
|
||
|
|
container_name: wwjcloud-kafka-ui
|
||
|
|
environment:
|
||
|
|
- KAFKA_CLUSTERS_0_NAME=wwjcloud
|
||
|
|
- KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=redpanda:9093
|
||
|
|
- SERVER_PORT=8082
|
||
|
|
ports:
|
||
|
|
- "8082:8082"
|
||
|
|
networks:
|
||
|
|
- 1panel-network
|
||
|
|
depends_on:
|
||
|
|
redpanda:
|
||
|
|
condition: service_healthy
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
redpanda_data:
|
||
|
|
driver: local
|