forked from lovoo/goka
/
kafka.yml
39 lines (36 loc) · 868 Bytes
/
kafka.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
version: '2'
services:
# zookeeper ==========================
zookeeper:
container_name: zookeeper
image: confluent/zookeeper
ports:
- "2181:2181"
# kafka ==============================
kafka:
container_name: kafka
image: wurstmeister/kafka
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- zookeeper
- redis
ports:
- "9092:9092"
- "9997:9997"
environment:
KAFKA_PORT: 9092
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_NUM_PARTITIONS: 10
KAFKA_DEFAULT_REPLICATION_FACTOR: 1
KAFKA_REPLICATION_FACTOR: 1
# redis =======================================
redis:
container_name: redis
image: redis:latest
ports:
- "6379:6379"
expose:
- "6379"