-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (54 loc) · 1.64 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (54 loc) · 1.64 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
version: '3'
services:
kafka:
image: bitnami/kafka:latest
ports:
- "29092:29092"
environment:
KAFKA_CFG_NODE_ID: 1
KAFKA_CFG_PROCESS_ROLES: 'broker,controller'
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: '1@kafka:9093'
KAFKA_CFG_LISTENERS: 'PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:29092'
KAFKA_CFG_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka:9092,EXTERNAL://localhost:29092'
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT'
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
ALLOW_PLAINTEXT_LISTENER: 'yes'
healthcheck:
test: ["CMD-SHELL", "kafka-topics.sh --bootstrap-server localhost:9092 --list"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
producer:
build:
context: .
dockerfile: Dockerfile.producer
ports:
- "8080:8080"
depends_on:
- kafka
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:9092
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
consumer:
build:
context: .
dockerfile: Dockerfile.consumer
ports:
- "8081:8081"
depends_on:
- kafka
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:9092
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/actuator/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s