better host address

This commit is contained in:
2026-08-30 14:42:18 +02:00
parent f8d5f5466c
commit 21cf23088c
3 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -3,4 +3,4 @@ HUE_APPLICATION_KEY=replace-with-your-hue-application-key
HUE_VERIFY_TLS=false HUE_VERIFY_TLS=false
COLLECT_INTERVAL_SECONDS=30 COLLECT_INTERVAL_SECONDS=30
LOG_LEVEL=INFO LOG_LEVEL=INFO
PUBLISH_ADDRESS=0.0.0.0
+7 -3
View File
@@ -37,9 +37,9 @@ available.
# Edit .env with the bridge IP and application key. # Edit .env with the bridge IP and application key.
docker compose up --build -d docker compose up --build -d
``` ```
4. Open [Grafana](http://localhost:3000) and sign in with `admin` / `admin`. The 4. Open Grafana at `http://HOST_LAN_IP:3000` and sign in with `admin` / `admin`. The
dashboard is in the **Hue** folder. Change this development password if the port dashboard is in the **Hue** folder. Change this development password if the port
will ever be exposed beyond localhost. is reachable by anyone else on your network.
Useful local endpoints: Useful local endpoints:
@@ -47,7 +47,11 @@ Useful local endpoints:
- VictoriaMetrics UI: <http://localhost:8428/vmui/> - VictoriaMetrics UI: <http://localhost:8428/vmui/>
- Grafana: <http://localhost:3000> - Grafana: <http://localhost:3000>
All published ports bind to `127.0.0.1`. Named Docker volumes retain metrics and By default, published ports bind to `0.0.0.0`, making them reachable through the
host's `192.168.178.x` address. Docker cannot bind to a wildcard subnet such as
`192.168.178.*`; to listen only on the LAN interface, set `PUBLISH_ADDRESS` in `.env`
to the host's exact address, for example `192.168.178.42`. Ensure your host firewall
permits access only from trusted networks. Named Docker volumes retain metrics and
Grafana state across restarts. TLS verification is off by default because Hue bridges Grafana state across restarts. TLS verification is off by default because Hue bridges
normally use a self-signed certificate; set `HUE_VERIFY_TLS=true` if yours has a normally use a self-signed certificate; set `HUE_VERIFY_TLS=true` if yours has a
trusted certificate. trusted certificate.
+3 -3
View File
@@ -9,7 +9,7 @@ services:
COLLECT_INTERVAL_SECONDS: ${COLLECT_INTERVAL_SECONDS:-30} COLLECT_INTERVAL_SECONDS: ${COLLECT_INTERVAL_SECONDS:-30}
LOG_LEVEL: ${LOG_LEVEL:-INFO} LOG_LEVEL: ${LOG_LEVEL:-INFO}
ports: ports:
- "127.0.0.1:8000:8000" - "${PUBLISH_ADDRESS:-0.0.0.0}:8000:8000"
healthcheck: healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/healthz')"] test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/healthz')"]
interval: 30s interval: 30s
@@ -27,7 +27,7 @@ services:
- victoria-metrics-data:/victoria-metrics-data - victoria-metrics-data:/victoria-metrics-data
- ./config/victoriametrics/scrape.yml:/etc/victoriametrics/scrape.yml:ro - ./config/victoriametrics/scrape.yml:/etc/victoriametrics/scrape.yml:ro
ports: ports:
- "127.0.0.1:8428:8428" - "${PUBLISH_ADDRESS:-0.0.0.0}:8428:8428"
depends_on: depends_on:
- hue-collector - hue-collector
@@ -43,7 +43,7 @@ services:
- ./config/grafana/provisioning:/etc/grafana/provisioning:ro - ./config/grafana/provisioning:/etc/grafana/provisioning:ro
- ./config/grafana/dashboards:/var/lib/grafana/dashboards:ro - ./config/grafana/dashboards:/var/lib/grafana/dashboards:ro
ports: ports:
- "127.0.0.1:3000:3000" - "${PUBLISH_ADDRESS:-0.0.0.0}:3000:3000"
depends_on: depends_on:
- victoriametrics - victoriametrics