-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (67 loc) · 2.5 KB
/
docker-compose.yml
File metadata and controls
71 lines (67 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# ─────────────────────────────────────────────────────────────
# Aevatar Development Infrastructure
#
# Quick start:
# docker compose up -d # start Kafka + Garnet + UI
# docker compose down # stop everything
#
# Kafka: localhost:9092
# Kafka UI: http://localhost:8080
# Garnet: localhost:6379
# ─────────────────────────────────────────────────────────────
services:
# ── Kafka (KRaft mode, no Zookeeper) ──
kafka:
image: bitnamilegacy/kafka:latest
container_name: aevatar-kafka
ports:
- "9092:9092"
environment:
# KRaft (no Zookeeper)
KAFKA_CFG_NODE_ID: 1
KAFKA_CFG_PROCESS_ROLES: controller,broker
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
# Listeners
KAFKA_CFG_LISTENERS: PLAINTEXT://:29092,CONTROLLER://:9093,EXTERNAL://:9092
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,EXTERNAL://localhost:9092
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: PLAINTEXT
ALLOW_PLAINTEXT_LISTENER: "yes"
# Auto-create topics for development
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "true"
# Performance
KAFKA_CFG_NUM_PARTITIONS: 4
KAFKA_CFG_DEFAULT_REPLICATION_FACTOR: 1
KAFKA_CFG_LOG_RETENTION_HOURS: 24
volumes:
- kafka-data:/bitnami/kafka
healthcheck:
test: ["CMD-SHELL", "kafka-topics.sh --bootstrap-server localhost:29092 --list || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
# ── Kafka UI (optional, for debugging) ──
kafka-ui:
image: provectuslabs/kafka-ui:latest
container_name: aevatar-kafka-ui
ports:
- "8080:8080"
environment:
DYNAMIC_CONFIG_ENABLED: "true"
KAFKA_CLUSTERS_0_NAME: aevatar-dev
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:29092
depends_on:
kafka:
condition: service_healthy
# ── Garnet (Redis protocol compatible cache/store) ──
garnet:
image: ghcr.io/microsoft/garnet:latest
container_name: aevatar-garnet
command: ["--lua", "true"]
ports:
- "6379:6379"
restart: unless-stopped
volumes:
kafka-data: