-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (81 loc) · 2.81 KB
/
Copy pathdocker-compose.yml
File metadata and controls
89 lines (81 loc) · 2.81 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
version: '3.8'
services:
# Kafka (using Redpanda for simpler setup)
redpanda:
image: docker.redpanda.com/redpandadata/redpanda:v25.3.6
command:
- redpanda
- start
- --kafka-addr internal://0.0.0.0:9092,external://0.0.0.0:19092
- --advertise-kafka-addr internal://redpanda:9092,external://localhost:19092
- --pandaproxy-addr internal://0.0.0.0:8082,external://0.0.0.0:18082
- --advertise-pandaproxy-addr internal://redpanda:8082,external://localhost:18082
- --schema-registry-addr internal://0.0.0.0:8081,external://0.0.0.0:18081
- --rpc-addr redpanda:33145
- --advertise-rpc-addr redpanda:33145
- --smp 1
- --memory 1G
- --mode dev-container
- --default-log-level=warn
ports:
- "19092:19092"
- "18082:18082"
- "18081:18081"
healthcheck:
test: ["CMD-SHELL", "rpk cluster health | grep -E 'Healthy:.+true' || exit 1"]
interval: 5s
timeout: 3s
retries: 5
volumes:
- redpanda_data:/var/lib/redpanda/data
# Create Kafka topics
redpanda-init:
image: docker.redpanda.com/redpandadata/redpanda:v25.3.6
depends_on:
redpanda:
condition: service_healthy
entrypoint: ["/bin/bash", "-c"]
command:
- |
rpk topic create howk.pending --brokers redpanda:9092 -p 6 -r 1 || true
rpk topic create howk.results --brokers redpanda:9092 -p 6 -r 1 || true
rpk topic create howk.deadletter --brokers redpanda:9092 -p 3 -r 1 || true
rpk topic create howk.scripts --brokers redpanda:9092 -p 3 -r 1 -c cleanup.policy=compact -c compression.type=snappy || true
rpk topic create howk.slow --brokers redpanda:9092 -p 6 -r 1 || true
# State topic with compaction - used for zero-maintenance reconciliation
rpk topic create howk.state --brokers redpanda:9092 -p 6 -r 1 -c cleanup.policy=compact -c segment.bytes=104857600 -c min.cleanable.dirty.ratio=0.01 || true
echo "Topics created successfully"
# Redis
redis:
image: redis:7-alpine
ports:
- "6380:6379"
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
volumes:
- redis_data:/data
# Redpanda Console (optional, for debugging)
console:
image: docker.redpanda.com/redpandadata/console:v2.8.2
depends_on:
redpanda:
condition: service_healthy
ports:
- "8888:8080"
environment:
KAFKA_BROKERS: redpanda:9092
KAFKA_SCHEMAREGISTRY_ENABLED: "false"
# Webhook test server (for development)
webhook-echo:
image: mendhak/http-https-echo:31
ports:
- "8090:8080"
environment:
- HTTP_PORT=8080
volumes:
redpanda_data:
redis_data: