-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
95 lines (88 loc) · 2.64 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
version: '3.4'
services:
base-service: &service
build:
context: .
dockerfile: docker/service.dockerfile
entrypoint: [ "app/entrypoint.sh" ]
image: sarya/sample-service
container_name: GraphQl-Sample-service
stdin_open: true
tty: true
ports:
- "8080:8080"
networks:
- GraphQl-Sample-service
service:
<<: *service
environment:
ENVIRONMENT: "local"
# kafka + zookeeper + schema registry
zookeeper: &zookeeper
hostname: zookeeper
container_name: zookeeper
image: confluentinc/cp-zookeeper:7.1.0
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- '2181:2181'
networks:
- GraphQl-Sample-service
kafka: &kafka
hostname: kafka
container_name: kafka
image: confluentinc/cp-server:7.1.0
depends_on:
- zookeeper
ports:
- '59092:59092'
- '9092:9092'
restart: on-failure:5
environment:
KAFKA_BROKER_ID: "0"
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_LISTENERS: "LISTENER_LOCAL://0.0.0.0:9092,LISTENER_DOCKER://kafka:29092,PLAINTEXT://kafka:59092"
KAFKA_ADVERTISED_LISTENERS: "LISTENER_LOCAL://localhost:9092,LISTENER_DOCKER://kafka:29092,PLAINTEXT://kafka:59092"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "LISTENER_LOCAL:PLAINTEXT,LISTENER_DOCKER:PLAINTEXT,PLAINTEXT:PLAINTEXT"
KAFKA_INTER_BROKER_LISTENER_NAME: "LISTENER_DOCKER"
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1"
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: "100"
networks:
- GraphQl-Sample-service
schema-registry: &schema-registry
hostname: schema-registry
container_name: schema-registry
image: confluentinc/cp-schema-registry:7.1.0
depends_on:
- zookeeper
- kafka
environment:
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'kafka:29092'
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: 'zookeeper:2181'
ports:
- 8081:8081
restart: on-failure:5
networks:
- GraphQl-Sample-service
kafka-ui:
container_name: kafka-ui
image: provectuslabs/kafka-ui:latest
ports:
- 9090:8080
depends_on:
- kafka
- schema-registry
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:29092
KAFKA_CLUSTERS_0_METRICS_PORT: 9997
KAFKA_CLUSTERS_0_SCHEMAREGISTRY: http://schema-registry:8081
DYNAMIC_CONFIG_ENABLED: 'true'
networks:
- GraphQl-Sample-service
networks:
GraphQl-Sample-service: