From 5705db4d60de7662eb7f8813e2726a4076bbcfef Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Tue, 17 Oct 2023 18:30:47 +0200 Subject: [PATCH] remove host mode and add -listen-address parameter --- .env.template | 3 ++- Dockerfile | 2 +- docker-compose.yml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.env.template b/.env.template index cd36279..0072474 100644 --- a/.env.template +++ b/.env.template @@ -1,2 +1,3 @@ USERNAME=***** -HUE_URL=192.168.178.34 \ No newline at end of file +HUE_URL=192.168.178.34 +LISTEN_ADDRESS=127.0.0.1:9773 diff --git a/Dockerfile b/Dockerfile index ef60c6b..45be5cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,4 @@ COPY --from=build /hue_exporter /hue_exporter COPY hue_metrics.json ./ EXPOSE 9773 -ENTRYPOINT [ "sh", "-c", "/hue_exporter -username ${USERNAME} -hue-url ${HUE_URL} -metrics-file hue_metrics.json" ] \ No newline at end of file +ENTRYPOINT [ "sh", "-c", "/hue_exporter -username ${USERNAME} -hue-url ${HUE_URL} -metrics-file hue_metrics.json -listen-address ${LISTEN_ADDRESS}" ] diff --git a/docker-compose.yml b/docker-compose.yml index 07cb7ce..9afb1c8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: dockerfile: ./Dockerfile restart: unless-stopped container_name: hue_exporter - network_mode: "host" + #network_mode: "host" ports: - 9773:9773 env_file: