-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
92 lines (86 loc) · 2.95 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
services:
zookeeper:
image: confluentinc/cp-zookeeper
container_name: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- "2181:2181"
kafka:
image: confluentinc/cp-kafka
container_name: kafka
depends_on:
- zookeeper
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
ports:
- "9092:9092"
kafka-connect:
image: 'confluentinc/cp-kafka-connect:latest'
environment:
CONNECT_BOOTSTRAP_SERVERS: 'kafka:9092'
CONNECT_REST_ADVERTISED_HOST_NAME: 'kafka-connect'
CONNECT_GROUP_ID: 'kafka-connect'
CONNECT_CONFIG_STORAGE_TOPIC: '_connect_configs_sink'
CONNECT_OFFSET_STORAGE_TOPIC: '_connect_offsets_sink'
CONNECT_STATUS_STORAGE_TOPIC: '_connect_status_sink'
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'
CONNECT_REST_PORT: 8083
CONNECT_PLUGIN_PATH: '/usr/share/java'
CONNECT_SECURITY_PROTOCOL: 'PLAINTEXT'
CONNECT_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 1
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 1
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 1
ports:
- '8083:8083'
depends_on:
- kafka
volumes: # Adding the plugins to Kafka-Connect
- ./kafka-connect-plugins/mongo-sink:/usr/share/java/mongo-sink
- ./kafka-connect-plugins/debezium-postgres-source:/usr/share/java/psql-source
kafka-ui:
image: provectuslabs/kafka-ui:latest
container_name: kafka-ui
depends_on:
- kafka
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
ports:
- "8080:8080"
postgres:
image: debezium/postgres:latest
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=commerce
ports:
- "5432:5432"
command: [ "postgres", "-c", "wal_level=logical" ] ## necessary to tell debezium how to connect to the pg instance and listen to the changes in the write ahead log
mongodb:
image: mongo
container_name: mongodb
restart: always
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: mongouser
MONGO_INITDB_ROOT_PASSWORD: mongopass
MONGO_INITDB_DATABASE: commerce
mongo-express:
image: mongo-express
restart: always
ports:
- "8081:8081"
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: mongouser
ME_CONFIG_MONGODB_ADMINPASSWORD: mongopass
ME_CONFIG_MONGODB_URL: mongodb://mongouser:mongopass@mongodb:27017/
ME_CONFIG_BASICAUTH: false