-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
65 lines (65 loc) · 1.62 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
version: "3"
services:
zookeeper:
image: bitnami/zookeeper:latest
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: bitnami/kafka:latest
ports:
- '9092:9092'
environment:
- KAFKA_BROKER_ID=0
- KAFKA_LISTENERS=PLAINTEXT://:9092
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_NUM_PARTITIONS=4
depends_on:
- zookeeper
database:
image: postgres
ports:
- '5432:5432'
volumes:
- database-data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=password
- POSTGRES_DB=messages
saga1:
image: kafkasaga
ports:
- '8181:8181'
environment:
- INSTANCE_ID=1
- SPRING_DATASOURCE_URL=jdbc:postgresql://database:5432/messages
- SPRING_KAFKA_BOOTSTRAP_SERVERS=kafka:9092
saga2:
image: kafkasaga
ports:
- '8182:8181'
environment:
- INSTANCE_ID=2
- SPRING_DATASOURCE_URL=jdbc:postgresql://database:5432/messages
- SPRING_KAFKA_BOOTSTRAP_SERVERS=kafka:9092
saga3:
image: kafkasaga
ports:
- '8183:8181'
environment:
- INSTANCE_ID=3
- SPRING_DATASOURCE_URL=jdbc:postgresql://database:5432/messages
- SPRING_KAFKA_BOOTSTRAP_SERVERS=kafka:9092
saga4:
image: kafkasaga
ports:
- '8184:8181'
environment:
- INSTANCE_ID=4
- SPRING_DATASOURCE_URL=jdbc:postgresql://database:5432/messages
- SPRING_KAFKA_BOOTSTRAP_SERVERS=kafka:9092
volumes:
database-data: