-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocker-compose.yml
63 lines (57 loc) · 1.46 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
version: '3.1'
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- 2181:2181
kafka:
image: wurstmeister/kafka
depends_on:
- zookeeper
ports:
- 9092:9092
environment:
KAFKA_ADVERTISED_HOST_NAME: ${KAFKA_HOST_NAME}
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "invoices.topic.events:1:1,invoices.topic.commands:1:1,invoices.topic.command-results:1:1,invoices.topic.snapshots:1:1:compact"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
mysql:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
volumes:
- ./listdao/src/main/resources/:/docker-entrypoint-initdb.d/
environment:
MYSQL_DATABASE: invoices
MYSQL_ROOT_PASSWORD: ${DB_PASS}
commandhandler:
build: ./commandhandler
depends_on:
- kafka
environment:
BOOTSTRAP_SERVERS: ${KAFKA_HOST_NAME}:9092
listprojector:
build: ./listprojector
depends_on:
- mysql
- kafka
environment:
BOOTSTRAP_SERVERS: ${KAFKA_HOST_NAME}:9092
DB_DRIVER: ${DB_DRIVER}
DB_URL: ${DB_URL}
DB_USER: ${DB_USER}
DB_PASS: ${DB_PASS}
web:
build: ./web
depends_on:
- mysql
- kafka
environment:
BOOTSTRAP_SERVERS: ${KAFKA_HOST_NAME}:9092
DB_DRIVER: ${DB_DRIVER}
DB_URL: ${DB_URL}
DB_USER: ${DB_USER}
DB_PASS: ${DB_PASS}
ports:
- 8080:8080