File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change 1
- version : ' 2'
1
+ version : ' 2.1 '
2
2
services :
3
3
postgresql :
4
4
image : postgres:14.10
5
+ healthcheck :
6
+ test : pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}
7
+ interval : 10s
8
+ timeout : 5s
9
+ retries : 10
5
10
restart : unless-stopped
6
11
tty : true
7
12
environment :
@@ -13,6 +18,11 @@ services:
13
18
14
19
kafka :
15
20
image : confluentinc/cp-kafka:7.6.0
21
+ healthcheck :
22
+ test : kafka-topics --bootstrap-server kafka:29092 --list
23
+ interval : 30s
24
+ timeout : 10s
25
+ retries : 3
16
26
ports :
17
27
- 9092:9092
18
28
environment :
@@ -34,7 +44,8 @@ services:
34
44
kafka-create-topics :
35
45
image : corda-os-docker.software.r3.com/corda-os-plugins:${CORDA_RUNTIME_VERSION}
36
46
depends_on :
37
- - kafka
47
+ kafka :
48
+ condition : service_healthy
38
49
command : [
39
50
" topic" ,
40
51
" -b=kafka:29092" ,
@@ -45,9 +56,12 @@ services:
45
56
corda :
46
57
image : corda-os-docker.software.r3.com/corda-os-combined-worker-kafka:${CORDA_RUNTIME_VERSION}
47
58
depends_on :
48
- - postgresql
49
- - kafka
50
- - kafka-create-topics
59
+ postgresql :
60
+ condition : service_healthy
61
+ kafka :
62
+ condition : service_healthy
63
+ kafka-create-topics :
64
+ condition : service_completed_successfully
51
65
volumes :
52
66
- ../config:/config
53
67
- ../logs:/logs
You can’t perform that action at this time.
0 commit comments