-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (64 loc) · 1.66 KB
/
docker-compose.yml
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
version: '3.8'
services:
event-shark:
build:
context: .
dockerfile: Dockerfile
container_name: event-publisher
ports:
- "8083:8083"
depends_on:
- init-topic
environment:
BROKERS: kafka:29092
TOPICS: expense-topic,payment-topic,transaction-topic
SCHEMAREGISTRY: kafka:8081
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8083/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 20s
kafka:
image: docker.vectorized.io/vectorized/redpanda:latest
container_name: kafka
command:
- redpanda start
- --smp 1
- --memory 1G
- --reserve-memory 0M
- --overprovisioned
- --node-id 0
- --check=false
- --kafka-addr PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092
- --advertise-kafka-addr PLAINTEXT://kafka:29092,OUTSIDE://localhost:9092
- --pandaproxy-addr 0.0.0.0:8082
- --advertise-pandaproxy-addr localhost:8082
ports:
- "8081:8081"
- "8082:8082"
- "9092:9092"
- "29092:29092"
init-topic:
build:
context: ./docker
dockerfile: Dockerfile
depends_on:
- kafka
console:
image: docker.redpanda.com/redpandadata/console:latest
entrypoint: /bin/sh
command: -c "echo \"$$CONSOLE_CONFIG_FILE\" > /tmp/config.yml && /app/console"
container_name: console
environment:
CONFIG_FILEPATH: /tmp/config.yml
CONSOLE_CONFIG_FILE: |
kafka:
brokers: ["kafka:29092"]
schemaRegistry:
enabled: true
urls: ["http://kafka:8081"]
ports:
- "8086:8080"
depends_on:
- kafka