forked from gAmUssA/pizza-shop-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-base.yml
54 lines (54 loc) · 1.53 KB
/
docker-compose-base.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
version: "3"
services:
mysql:
image: mysql/mysql-server:8.0.27
hostname: mysql
container_name: mysql
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=debezium
- MYSQL_USER=mysqluser
- MYSQL_PASSWORD=mysqlpw
volumes:
- ./mysql/mysql.cnf:/etc/mysql/conf.d
- ./mysql/mysql_bootstrap.sql:/docker-entrypoint-initdb.d/mysql_bootstrap.sql
- ./mysql/data:/var/lib/mysql-files/data
zookeeper:
image: zookeeper:latest
container_name: zookeeper
hostname: zookeeper
ports:
- "2181:2181"
environment:
ZOO_MY_ID: 1
ZOO_PORT: 2181
ZOO_SERVERS: server.1=zookeeper:2888:3888;2181
kafka:
image: confluentinc/cp-kafka:latest
hostname: kafka
container_name: kafka
ports:
- "29092:29092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TOOLS_LOG4J_LOGLEVEL: ERROR
depends_on:
[zookeeper]
healthcheck: {test: nc -z localhost 9092, interval: 1s}
orders-service:
build: orders-service
restart: unless-stopped
container_name: orders-service
depends_on:
- mysql
- kafka
environment:
- MYSQL_SERVER=mysql
- KAFKA_BROKER_HOSTNAME=kafka
- KAFKA_BROKER_PORT=9092