forked from gbeade/itba-bd2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
133 lines (120 loc) · 3.04 KB
/
docker-compose.yaml
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
122
123
124
125
126
127
128
129
130
131
132
133
services:
redmond:
container_name: redmond
build: ./redmond
restart: unless-stopped
environment:
- 'banks.urls=http://bank-01:80,http://bank-02:80'
ports:
- '8080:8080'
depends_on:
- redmond-postgres
- redmond-redis
- redmond-zookeeper
- redmond-broker
- redmond-elastic
- bank-01
- bank-02
redmond-postgres:
image: 'postgres:latest'
container_name: redmond-postgres
environment:
- 'POSTGRES_DB=redmond_tx'
- 'POSTGRES_PASSWORD=postgres'
- 'POSTGRES_USER=postgres'
ports:
- '5432:5432'
redmond-redis:
image: redis:latest
container_name: redmond-redis
ports:
- "6379:6379"
redmond-zookeeper:
image: confluentinc/cp-zookeeper:7.3.2
container_name: redmond-zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
redmond-broker:
image: confluentinc/cp-kafka:7.3.2
container_name: redmond-broker
depends_on:
- redmond-zookeeper
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'redmond-zookeeper:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://redmond-broker:9092,PLAINTEXT_INTERNAL://redmond-broker:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
bank-01:
container_name: bank-01
build: ./bank
environment:
- 'BANK_ID=01'
ports:
- '8081:80'
depends_on:
- bank-01-postgres
bank-01-postgres:
image: 'postgres:latest'
container_name: bank-01-postgres
environment:
- 'POSTGRES_DB=bank-01-db'
- 'POSTGRES_PASSWORD=postgres'
- 'POSTGRES_USER=postgres'
bank-02:
container_name: bank-02
build: ./bank
environment:
- 'BANK_ID=02'
ports:
- '8082:80'
depends_on:
- bank-02-postgres
bank-02-postgres:
image: 'postgres:latest'
container_name: bank-02-postgres
environment:
- 'POSTGRES_DB=bank-02-db'
- 'POSTGRES_PASSWORD=postgres'
- 'POSTGRES_USER=postgres'
redmond-mongo:
image: mongo:latest
container_name: redmond-mongo
ports:
- "27017:27017"
redmond-neo4j:
image: neo4j:latest
container_name: redmond-neo4j
ports:
- "7474:7474"
- "7687:7687"
environment:
NEO4J_AUTH: neo4j/new_password
volumes:
- redmond-neo4j-data:/data
- redmond-neo4j-logs:/logs
redmond-elastic:
image: elasticsearch:7.17.10
container_name: redmond-elastic
ports:
- "9200:9200"
volumes:
- redmond-elastic-data:/usr/share/elasticsearch/data
environment:
- "xpack.security.enabled=false"
- "discovery.type=single-node"
- "ES_JAVA_OPTS=-Xmx2g"
redmond-web:
build: ./web
container_name: redmond-web
ports:
- '80:3000'
volumes:
redmond-neo4j-data:
redmond-neo4j-logs:
redmond-elastic-data: