From b3b8e8543f9f3d154c30c05a19ca5a619eb70402 Mon Sep 17 00:00:00 2001 From: Mehdi Mehraban Date: Mon, 11 Sep 2023 08:43:01 +0330 Subject: [PATCH 1/2] add run with docker compose --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 924a606f..a92bcdfc 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Table of Contents - [Run](#run) - [Run Binary](#run-binary) - [Run Docker Image](#run-docker-image) + - - [Run Docker Compose](#run-docker-compose) - [Flags](#flags) - [Notes](#notes) - [Metrics](#metrics) @@ -86,6 +87,17 @@ kafka_exporter --kafka.server=kafka:9092 [--kafka.server=another-server ...] docker run -ti --rm -p 9308:9308 danielqsj/kafka-exporter --kafka.server=kafka:9092 [--kafka.server=another-server ...] ``` +### Run Docker Compose + +``` +services: + kafka-exporter: + image: danielqsj/kafka-exporter + command: ["--kafka.server=kafka:9092", "[--kafka.server=another-server ...]"] + ports: + - 9308:9308 +``` + Flags ----- From 079320b385d764ad18ff2ff23ec9ce756ed0b152 Mon Sep 17 00:00:00 2001 From: Mehdi Mehraban Date: Mon, 11 Sep 2023 08:53:36 +0330 Subject: [PATCH 2/2] add run with docker composer --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a92bcdfc..e99a260c 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ docker run -ti --rm -p 9308:9308 danielqsj/kafka-exporter --kafka.server=kafka:9 ``` ### Run Docker Compose - +make a `docker-compose.yml` flie ``` services: kafka-exporter: @@ -97,6 +97,10 @@ services: ports: - 9308:9308 ``` +then run it +``` +docker-compose up -d +``` Flags -----