Healthcheck support
Would it be possible to add healthcheck support? I'm trying to run the single instance of zookeeper and kafka (zk-single-kafka-single.yml) on github actions. It seems like it's not waiting for the kafka instance to be ready. I've also tried this and a bunch of other things:
depends_on:
kafka:
condition: service_healthy
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Start Services
run: docker compose up -d && docker compose up ready || true
- name: Verify
run: docker run --network=host edenhill/kcat:1.7.1 -b localhost:9092 -L -T
The resulting output: https://github.com/FoundatioFx/Foundatio.Kafka/runs/6716787571?check_suite_focus=true
I can't seem to get this to run reliably but what I've seen others do is something like this:
healthcheck:
test: ["CMD", "kafka-topics", "--bootstrap-server", "kafka1:9092", "--list"]
start_period: 15s
interval: 30s
timeout: 10s
retries: 3
I get that there are built in health checks, I've been struggling to get anything to connect to kafka instance in github actions. I do see that you have test.sh and it's somewhat working (although there are errors in the build step trying to process a message).
Hi, in order to do an health check, you can use:
- For Kafka: kafka-topics --bootstrap-server broker:9092 --list
- For Conduktor Console: curl --fail http://localhost:8080/platform/api/modules/health/ready