-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
198 lines (187 loc) · 4.66 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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
version: '3.9'
services:
zookeeper:
image: confluentinc/cp-zookeeper:7.4.4
container_name: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- 22181:2181
networks:
- net
broker:
image: confluentinc/cp-kafka:7.4.4
container_name: broker
hostname: broker
ports:
- "9092:9092"
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:9092,PLAINTEXT_INTERNAL://broker:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
networks:
- net
eureka-server:
container_name: eureka-server
build: ./main/eureka-server
hostname: eureka-server
image: endrey/baby-billing-eureka-server
ports:
- "8761:8761"
networks:
- net
postgres-cdr:
container_name: postgres-cdr
hostname: postgres-cdr
image: postgres
healthcheck:
test: [ "CMD", "pg_isready","-d","postgres","-U","postgres" ]
interval: 5s
timeout: 1s
retries: 5
start_period: 5s
environment:
POSTGRES_DB: baby_billing_cdr
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
ports:
- "5434:5432"
networks:
- cdr
postgres-brt:
container_name: postgres-brt
image: postgres
healthcheck:
test: [ "CMD", "pg_isready","-d","postgres","-U","postgres" ]
interval: 5s
timeout: 1s
retries: 5
start_period: 5s
environment:
POSTGRES_DB: baby_billing_brt
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
ports:
- "5433:5432"
networks:
- brt
postgres-hrs:
container_name: postgres-hrs
image: postgres
healthcheck:
test: [ "CMD", "pg_isready","-d","postgres","-U","postgres" ]
interval: 5s
timeout: 1s
retries: 5
start_period: 5s
environment:
POSTGRES_DB: baby_billing_hrs
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
ports:
- "5435:5432"
networks:
- hrs
cdr-generator-service:
container_name: cdr-generator-service
build: ./main/cdr-generator-service
image: endrey/baby-billing-cdr-generator-service
environment:
POSTGRES_URL: jdbc:postgresql://postgres-cdr:5432/baby_billing_cdr?useSSL=false
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
KAFKA_HOST: broker
ports:
- "8081:8081"
depends_on:
postgres-cdr:
condition: service_healthy
broker:
condition: service_started
networks:
- net
- cdr
brt-service:
container_name: brt-service
build: ./main/brt-service
image: endrey/baby-billing-brt-service
environment:
POSTGRES_URL: jdbc:postgresql://postgres-brt:5432/baby_billing_brt?useSSL=false
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
EUREKA_HOST: eureka-server
KAFKA_HOST: broker
ports:
- "8082:8082"
depends_on:
eureka-server:
condition: service_started
postgres-brt:
condition: service_healthy
broker:
condition: service_started
hrs-service:
condition: service_healthy
networks:
- net
- brt
hrs-service:
container_name: hrs-service
build: ./main/hrs-service
image: endrey/baby-billing-hrs-service
environment:
POSTGRES_URL: jdbc:postgresql://postgres-hrs:5432/baby_billing_hrs?useSSL=false
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
EUREKA_HOST: eureka-server
KAFKA_HOST: broker
healthcheck:
test: curl --fail http://localhost:8083/health
interval: 10s
timeout: 5s
retries: 5
start_period: 40s
ports:
- "8083:8083"
depends_on:
eureka-server:
condition: service_started
postgres-hrs:
condition: service_healthy
broker:
condition: service_started
networks:
- net
- hrs
gateway:
container_name: gateway
build: ./main/gateway
image: endrey/baby-billing-gateway
environment:
EUREKA_HOST: eureka-server
ports:
- "8080:8080"
depends_on:
eureka-server:
condition: service_started
broker:
condition: service_started
networks:
- net
networks:
net:
driver: bridge
cdr:
driver: bridge
brt:
driver: bridge
hrs:
driver: bridge