-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-dev.yml
121 lines (114 loc) · 3.67 KB
/
docker-compose-dev.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
version: '3.8'
services:
mysql:
container_name: ecommerce-mysql
image: mysql:latest
environment:
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_DATABASE=ecommerce
security_opt:
- seccomp:unconfined
ports:
- 3307:3306
networks:
- ecommerce_network
redis:
container_name: ecommerce-redis
image: redis:7-alpine
ports:
- "6380:6379"
networks:
- ecommerce_network
zookeeper:
image: confluentinc/cp-zookeeper:latest
container_name: ecommerce-zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
networks:
- kafka
kafka:
image: confluentinc/cp-kafka:latest
container_name: ecommerce-kafka
depends_on:
- zookeeper
ports:
- "9092:9092"
- "9094:9094"
environment:
KAFKA_BROKER_ID: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_LISTENERS: INTERNAL://:9092,OUTSIDE://:9094
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:9092,OUTSIDE://host.docker.internal:9094
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,OUTSIDE:PLAINTEXT
extra_hosts:
- "host.docker.internal:172.17.0.1"
networks:
- kafka
# kafka-connect:
# image: confluentinc/cp-kafka-connect-base:6.0.0
# container_name: ecommerce-kafka-connect
# depends_on:
# - kafka
# - mysql
# ports:
# - "8083:8083"
# networks:
# - ecommerce_network
# - kafka
# environment:
# CONNECT_BOOTSTRAP_SERVERS: "kafka:9092"
# CONNECT_REST_PORT: 8083
# CONNECT_GROUP_ID: kafka-connect
# CONNECT_CONFIG_STORAGE_TOPIC: _connect-configs
# CONNECT_OFFSET_STORAGE_TOPIC: _connect-offsets
# CONNECT_STATUS_STORAGE_TOPIC: _connect-status
# CONNECT_KEY_CONVERTER: org.apache.kafka.connect.storage.StringConverter
# 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_ADVERTISED_HOST_NAME: "ecommerce-kafka-connect"
# CONNECT_LOG4J_ROOT_LOGLEVEL: "INFO"
# CONNECT_LOG4J_LOGGERS: "org.apache.kafka.connect.runtime.rest=WARN,org.reflections=ERROR"
# CONNECT_LOG4J_APPENDER_STDOUT_LAYOUT_CONVERSIONPATTERN: "[%d] %p %X{connector.context}%m (%c:%L)%n"
# CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: "1"
# CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: "1"
# CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: "1"
# CONNECT_PLUGIN_PATH: /usr/share/java,/usr/share/confluent-hub-components,/data/connect-jars
# volumes:
# - ./docker/plugins:/plugins
# command:
# - bash
# - -c
# - |
# echo "Installing Connector"
# confluent-hub install --no-prompt debezium/debezium-connector-mysql:1.2.2
# #
# echo "Copying Connector JARs"
# cp /plugins/* /usr/share/confluent-hub-components/debezium-debezium-connector-mysql/lib
# #
# echo "Launching Kafka Connect worker"
# /etc/confluent/docker/run &
# #
# sleep infinity
# extra_hosts:
# - "host.docker.internal:172.17.0.1"
elasticsearch:
container_name: ecommerce-elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.9
environment:
- discovery.type=single-node
- "bootstrap.memory_lock=true"
- "cluster.name=ecommerce"
- "node.name=es01"
- "ES_JAVA_OPTS=-Xms256m -Xmx512m"
ports:
- "9200:9200"
- "9300:9300"
networks:
- ecommerce_network
networks:
ecommerce_network:
kafka:
external: true