Skip to content

Commit b37f5c8

Browse files
author
Devdutt Shenoi
committed
fix: wait for healthy service
1 parent 70ca2f0 commit b37f5c8

File tree

4 files changed

+34
-17
lines changed

4 files changed

+34
-17
lines changed

docker-compose-distributed-test-with-kafka.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ services:
1111
volumes:
1212
- ./parseable-ingest-haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
1313
depends_on:
14-
- parseable-ingest-one
15-
- parseable-ingest-two
14+
parseable-ingest-one:
15+
condition: service_healthy
16+
parseable-ingest-two:
17+
condition: service_healthy
1618
networks:
1719
- parseable-internal
1820
healthcheck:
@@ -210,9 +212,12 @@ services:
210212
networks:
211213
- parseable-internal
212214
depends_on:
213-
- parseable-query
214-
- parseable-ingest-haproxy
215-
- minio
215+
parseable-query:
216+
condition: service_healthy
217+
parseable-ingest-haproxy:
218+
condition: service_healthy
219+
minio:
220+
condition: service_healthy
216221
deploy:
217222
restart_policy:
218223
condition: on-failure

docker-compose-distributed-test.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ services:
5353
timeout: 20s
5454
retries: 5
5555
depends_on:
56-
- minio
56+
minio:
57+
condition: service_healthy
5758
deploy:
5859
restart_policy:
5960
condition: on-failure
@@ -89,8 +90,10 @@ services:
8990
timeout: 20s
9091
retries: 5
9192
depends_on:
92-
- parseable-query
93-
- minio
93+
parseable-query:
94+
condition: service_healthy
95+
minio:
96+
condition: service_healthy
9497
deploy:
9598
restart_policy:
9699
condition: on-failure
@@ -121,9 +124,12 @@ services:
121124
networks:
122125
- parseable-internal
123126
depends_on:
124-
- parseable-query
125-
- parseable-ingest-one
126-
- minio
127+
parseable-query:
128+
condition: service_healthy
129+
parseable-ingest-one:
130+
condition: service_healthy
131+
minio:
132+
condition: service_healthy
127133
deploy:
128134
restart_policy:
129135
condition: on-failure

docker-compose-test-with-kafka.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ services:
4949
- P_KAFKA_BOOTSTRAP_SERVERS=kafka-0:9092
5050
# additional settings like security, tuning, etc.
5151
depends_on:
52-
- minio
53-
- kafka-0
52+
minio:
53+
condition: service_healthy
54+
kafka-0:
55+
condition: service_healthy
5456
healthcheck:
5557
test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v1/liveness" ]
5658
interval: 15s
@@ -82,7 +84,8 @@ services:
8284
"parseable"
8385
]
8486
depends_on:
85-
- parseable
87+
parseable:
88+
condition: service_healthy
8689
networks:
8790
- parseable-internal
8891
deploy:
@@ -153,7 +156,8 @@ services:
153156
- LOG_RATE=5000
154157
- TOTAL_LOGS=500_000
155158
depends_on:
156-
- kafka-0
159+
kafka-0:
160+
condition: service_healthy
157161
networks:
158162
- parseable-internal
159163
deploy:

docker-compose-test.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ services:
4444
- P_CHECK_UPDATE=false
4545
- P_PARQUET_COMPRESSION_ALGO=snappy
4646
depends_on:
47-
- minio
47+
minio:
48+
condition: service_healthy
4849
healthcheck:
4950
test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v1/liveness" ]
5051
interval: 15s
@@ -76,7 +77,8 @@ services:
7677
"parseable"
7778
]
7879
depends_on:
79-
- parseable
80+
parseable:
81+
condition: service_healthy
8082
networks:
8183
- parseable-internal
8284
deploy:

0 commit comments

Comments
 (0)