From 1bc31ce5dd31eeae2d2220d0f092899bef40beab Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Fri, 12 Jan 2024 15:36:03 -0800 Subject: [PATCH] Allow exposed metrics port to be overridden Rekor uses the same metrics port, so if both services are run with docker-compose they conflict with each other. Add an environment variable to expose the metrics service on a different docker port. Signed-off-by: Colleen Murphy --- docker-compose.yml | 2 +- docs/setup.md | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 99ca7a52b..39044f79d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,7 +34,7 @@ services: ports: - "5555:5555" - "5554:5554" - - "2112:2112" + - "${FULCIO_METRICS_PORT:-2112}:2112" volumes: - ~/.config/gcloud:/root/.config/gcloud/:z # for GCP authentication - ./config/config.jsn:/etc/fulcio-config/config.json:z diff --git a/docs/setup.md b/docs/setup.md index aefa992a2..01129b816 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -12,6 +12,14 @@ Simply run: docker-compose up ``` +If you need to change the docker port on which the metrics port is bound, use +the `FULCIO_METRICS_PORT` variable: + +``` +export FULCIO_METRICS_PORT=2113 +docker-compose up +``` + The other way is running the Fulcio binary: ```