Skip to content

Commit 0383af2

Browse files
committed
add healthcheck to docker compose
1 parent e977dd3 commit 0383af2

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/ci_workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Install dependencies
4848
run: uv sync
4949
- name: start elasticsearch container
50-
run: docker-compose up -d elasticsearch --wait --wait-timeout 30 &
50+
run: docker-compose up -d elasticsearch --wait &
5151
- name: Test with pytest
5252
run: uv run pytest --capture=no
5353

@@ -76,6 +76,6 @@ jobs:
7676
- name: Install Meltano plugins
7777
run: meltano install --clean
7878
- name: start elasticsearch container
79-
run: docker-compose up -d elasticsearch --wait --wait-timeout 30 &
79+
run: docker-compose up -d elasticsearch --wait &
8080
- name: smoke-test-tap
8181
run: meltano run tap-smoke-test target-elasticsearch

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ services:
1515
memlock:
1616
soft: -1
1717
hard: -1
18+
healthcheck:
19+
test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=10s || exit 1"]
20+
interval: 10s
21+
timeout: 10s
22+
retries: 12
23+
start_period: 30s
1824
kibana:
1925
depends_on:
2026
- elasticsearch

0 commit comments

Comments
 (0)