-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
65 lines (61 loc) · 1.93 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
---
version: '2'
networks:
kafkanet:
driver: bridge
services:
kafkaserver:
image: spotify/kafka
container_name: kafka
hostname: kafkaserver
networks:
- kafkanet
ports:
- 2181:2181
- 9092:9092
environment:
ADVERTISED_HOST: kafkaserver
ADVERTISED_PORT: 9092
kafka_manager:
image: "mzagar/kafka-manager-docker:1.3.3.4"
container_name: kafkamanager
networks:
- kafkanet
ports:
- 9000:9000
links:
- kafkaserver
environment:
ZK_HOSTS: "kafkaserver:2181"
# ES:
# image: elasticsearch
# hostname: elasticsearch
# ports:
# - '9200:9200'
# depends_on:
# - 'zookeeper'
# - kafka
# environment:
# extra-hosts:
# # This "container" is a workaround to pre-create topics for the Kafka application
# kafka-create-topics:
# image: confluentinc/cp-kafka
# depends_on:
# - kafka
# hostname: kafka-create-topics
# # We defined a dependency on "kafka", but `depends_on` will NOT wait for the
# # dependencies to be "ready" before starting the "kafka-create-topics"
# # container; it waits only until the dependencies have started. Hence we
# # must control startup order more explicitly.
# # See https://docs.docker.com/compose/startup-order/
# command: "bash -c 'echo Waiting for Kafka to be ready... && \
# cub kafka-ready -b kafka:9092 1 20 && \
# kafka-topics --create --topic my-topic --if-not-exists --zookeeper localhost:2181 --partitions 1 --replication-factor 1 && \
# sleep infinity'"
# environment:
# # The following settings are listed here only to satisfy the image's requirements.
# # We override the image's `command` anyways, hence this container will not start a broker.
# KAFKA_BROKER_ID: ignored
# KAFKA_ZOOKEEPER_CONNECT: ignored
# extra_hosts:
# - "moby:127.0.0.1"