-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
135 lines (124 loc) · 4.01 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
120
121
122
123
124
125
126
127
128
129
130
131
132
---
version: "2.2"
services:
zk:
image: confluentinc/cp-zookeeper:6.1.1
hostname: zk
container_name: zk
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
mem_limit: 200m
restart: always
kafka:
image: confluentinc/cp-kafka:6.1.1
hostname: kafka
container_name: kafka
ports:
- "9092:9092"
depends_on:
- zk
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zk:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:19092,PE://127.0.0.1:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_COMPRESSION_TYPE: lz4
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_DELETE_TOPIC_ENABLE: "true"
KAFKA_MIN_INSYNC_REPLICAS: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_CONFLUENT_LICENSE_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CONFLUENT_BALANCER_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PE:PLAINTEXT
KAFKA_CONFLUENT_SCHEMA_REGISTRY_URL: http://schema-registry:8081
CONFLUENT_SUPPORT_METRICS_ENABLE: "false"
mem_limit: 1500m
restart: always
schema-registry:
image: confluentinc/cp-schema-registry:6.1.1
hostname: schema-registry
container_name: schema-registry
ports:
- "8081:8081"
depends_on:
- kafka
environment:
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'kafka:19092'
mem_limit: 400m
restart: always
ksqldb:
image: confluentinc/cp-ksqldb-server:6.1.1
hostname: ksqldb
container_name: ksqldb
ports:
- "8088:8088"
depends_on:
- schema-registry
environment:
KSQL_CONFIG_DIR: "/etc/ksql"
KSQL_BOOTSTRAP_SERVERS: "kafka:19092"
KSQL_HOST_NAME: ksqldb
KSQL_LISTENERS: "http://0.0.0.0:8088"
KSQL_CACHE_MAX_BYTES_BUFFERING: 0
KSQL_KSQL_SCHEMA_REGISTRY_URL: "http://schema-registry:8081"
KSQL_PRODUCER_INTERCEPTOR_CLASSES: "io.confluent.monitoring.clients.interceptor.MonitoringProducerInterceptor"
KSQL_CONSUMER_INTERCEPTOR_CLASSES: "io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor"
KSQL_KSQL_LOGGING_PROCESSING_TOPIC_REPLICATION_FACTOR: 1
KSQL_KSQL_LOGGING_PROCESSING_TOPIC_AUTO_CREATE: 'true'
KSQL_KSQL_LOGGING_PROCESSING_STREAM_AUTO_CREATE: 'true'
CONFLUENT_SUPPORT_METRICS_ENABLE: "false"
mem_limit: 1000m
restart: always
set-topics:
image: confluentinc/cp-kafka:6.1.1
container_name: set-topics
depends_on:
- kafka
command: >
bash -c "kafka-topics --create --topic persons --bootstrap-server kafka:19092 --partitions 1 --replication-factor 1 --config cleanup.policy=compact --if-not-exists
&& kafka-topics --create --topic address-updates --bootstrap-server kafka:19092 --partitions 1 --replication-factor 1 --config cleanup.policy=compact --if-not-exists"
restart: on-failure
schema-setter:
build:
context: schema-setter
container_name: schema-setter
depends_on:
- schema-registry
volumes:
- "${HOME}/.m2:/root/.m2"
environment:
SCHEMA_REGISTRY_URL: "http://schema-registry:8081"
mem_limit: 400m
restart: on-failure
rust-data-creator:
build:
context: rust-data-creator
container_name: rust-data-creator
depends_on:
- ksqldb
environment:
KSQL_URL: "ksqldb:8088"
KAFKA_BROKERS: "kafka:19092"
SCHEMA_REGISTRY_URL: "http://schema-registry:8081"
mem_limit: 100m
restart: on-failure
js-graphql-endpoint:
build:
context: js-graphql-endpoint
container_name: js-graphql-endpoint
ports:
- "4000:4000"
depends_on:
- ksqldb
- schema-setter
- rust-data-creator
mem_limit: 400m
restart: on-failure