-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
60 lines (53 loc) · 1.68 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
version: '3'
# Kafka + zookeeper: https://towardsdatascience.com/kafka-docker-python-408baf0e1088
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
ports:
- "9092:9092"
expose:
- "9093"
environment:
#KAFKA_ADVERTISED_HOST_NAME: kafka
# KAFKA_CREATE_TOPICS: "Topic1:1:3,Topic2:1:1:compact"
KAFKA_CREATE_TOPICS: ${KAFKA_TOPIC}:1:1
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
# from here on C&P from https://towardsdatascience.com/kafka-docker-python-408baf0e1088
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9093,OUTSIDE://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_LISTENERS: INSIDE://0.0.0.0:9093,OUTSIDE://0.0.0.0:9092
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# kafdrop: https://medium.com/better-programming/a-simple-apache-kafka-cluster-with-docker-kafdrop-and-python-cf45ab99e2b9
# to get a simple UI whats going on in kafka...
kafdrop:
image: obsidiandynamics/kafdrop
restart: "no"
ports:
- "9000:9000"
environment:
KAFKA_BROKERCONNECT: "kafka:9093"
depends_on:
- kafka
db:
image: postgres
restart: always
ports:
# I've locally already a postgres running
- "${CONSUMER_POSTGRES_PORT}:5432"
environment:
POSTGRES_PASSWORD: ${CONSUMER_POSTGRES_PASSWORD}
POSTGRES_USER: ${CONSUMER_POSTGRES_USER}
POSTGRES_DB: ${CONSUMER_POSTGRES_DB}
#parse-engine:
# build: .
# depends_on:
# - "kafka"
# command: python parse-engine.py
# ports:
# - "5000:5000"