-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
86 lines (84 loc) · 2.65 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: "2.1"
services:
zookeeper:
image: wurstmeister/zookeeper:latest
ports:
- 2181:2181
kafka:
image: wurstmeister/kafka:0.10.2.0
ports:
- "9092:9092"
links:
- zookeeper
depends_on:
- zookeeper
healthcheck:
test: echo '' | nc -w 1 "kafka" 9093
environment:
KAFKA_BROKER_ID: 1
KAFKA_PORT: 9092
KAFKA_ADVERTISED_HOST_NAME: "kafka"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL,OUTSIDE:PLAINTEXT"
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9093,OUTSIDE://localhost:9092"
KAFKA_LISTENERS: "PLAINTEXT://:9093,OUTSIDE://:9092"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "input:1:1,output:1:1"
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
volumes:
- /tmp/kafka-data/data:/data
- /tmp/kafka-data/logs:/logs
- /var/run/docker.sock:/var/run/docker.sock
# anon-kafka-mirror:
# image: quay.io/nodefluent/anon-kafka-mirror:latest
# restart: always
# links:
# - kafka
# depends_on:
# kafka:
# condition: service_healthy
# ports:
# - "8383:8383"
# environment:
# DEBUG: "*"
# command: [
# "anon-kafka-mirror",
# "--consumer-broker-list=kafka:9093",
# "--consumer-topic=input",
# "--producer-broker-list=kafka:9093",
# "--producer-topic=output",
# "--consumer-group=test-group",
# "--topic-config-file=/config/input.json"
# ]
# volumes:
# - ./examples:/config
anon-kafka-mirror-local:
build:
context: .
dockerfile: local.Dockerfile
restart: always
links:
- kafka
depends_on:
kafka:
condition: service_healthy
ports:
- "8383:8383"
environment:
DEBUG: "*"
command: [
"nodemon",
"-e",
"ts",
"-x",
"ts-node",
"index.ts",
"--consumer-broker-list=kafka:9093",
"--consumer-topic=input",
"--producer-broker-list=kafka:9093",
"--producer-topic=output",
"--consumer-group=test-group",
"--topic-config-file=/usr/src/app/examples/input.json"
]
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules