-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
119 lines (110 loc) · 3.25 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
version: '3'
services:
dispatcher-1:
image: 'joumenharzli/notifications-dispatcher:latest'
hostname: dispatcher-1
container_name: dispatcher-1
environment:
- 'KAFKA_SERVERS=kafka:9092'
- KAFKA_GROUP_ID=dispatcher-1
- KAFKA_TOPIC=notifications
depends_on:
- kafka
networks:
- app
service-1:
image: 'joumenharzli/notifications-service:latest'
hostname: service-1
container_name: service-1
environment:
- PORT=8081
- CASSANDRA_HOST=cassandra
- CASSANDRA_KEYSPACE=app
ports:
- '8081:8081'
depends_on:
- kafka
- cassandra
networks:
- app
nginx:
build: nginx
image: 'joumenharzli/nginx:latest'
container_name: nginx
ports:
- '80:80'
- '443:443'
depends_on:
- dispatcher-1
networks:
- app
zookeeper:
image: 'confluentinc/cp-zookeeper:5.0.1'
hostname: zookeeper
container_name: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
networks:
- app
kafka:
image: 'confluentinc/cp-kafka:5.0.1'
hostname: kafka
container_name: kafka
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
ports:
- '29092:29092'
depends_on:
- zookeeper
networks:
- app
kafka-connect:
image: 'datamountaineer/kafka-connect-cassandra:1.1.0'
hostname: kafka-connect
container_name: kafka-connect
environment:
CONNECT_REST_PORT: 8083
CONNECT_GROUP_ID: connect-cassandra-sink
CONNECT_STATUS_STORAGE_TOPIC: connect-cassandra-sink-status
CONNECT_CONFIG_STORAGE_TOPIC: connect-cassandra-sink-config
CONNECT_OFFSET_STORAGE_TOPIC: connect-cassandra-sink-offset
CONNECT_BOOTSTRAP_SERVERS: 'kafka:9092'
CONNECT_KEY_CONVERTER: org.apache.kafka.connect.json.JsonConverter
CONNECT_VALUE_CONVERTER: org.apache.kafka.connect.json.JsonConverter
CONNECT_INTERNAL_KEY_CONVERTER: org.apache.kafka.connect.json.JsonConverter
CONNECT_INTERNAL_VALUE_CONVERTER: org.apache.kafka.connect.json.JsonConverter
CONNECTOR_CONNECTOR_CLASS: com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraSinkConnector
CONNECTOR_TASKS_MAX: 1
CONNECT_LOG4J_LOGGERS: 'org.apache.zookeeper=ERROR,org.I0Itec.zkclient=ERROR,org.reflections=ERROR'
CONNECT_REST_HOST_NAME: 0.0.0.0
CONNECT_REST_ADVERTISED_HOST_NAME: kafka-connect
CONNECTOR_NAME: cassandra-sink-notifications
CONNECTOR_CONNECT_CASSANDRA_SINK_KCQL: 'INSERT INTO notifications SELECT * FROM notifications'
CONNECTOR_TOPICS: topic-consumer-logs
CONNECTOR_CONNECT_CASSANDRA_CLUSTER_NAME: cassandra
ports:
- '8083:8083'
depends_on:
- kafka
- cassandra
networks:
- app
cassandra:
image: 'cassandra:3'
hostname: cassandra
container_name: cassandra
environment:
- CASSANDRA_CLUSTER_NAME=app
ports:
- '9042:9042'
networks:
- app
networks:
app:
driver: bridge