From f2665d28c807b94aecb5d9549534f77ca9ea784a Mon Sep 17 00:00:00 2001 From: Dorian Date: Sat, 9 May 2026 16:29:19 +0100 Subject: [PATCH] Use Datum service network for API polling --- .env.example | 4 ++-- README.md | 12 +++++++----- docker-compose.yml | 12 ++++++------ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.env.example b/.env.example index 1a96368..a2f32db 100644 --- a/.env.example +++ b/.env.example @@ -13,9 +13,9 @@ LOG_LEVEL=info # STATIC_DIR= # ---- Datum gateway (the Umbrel app we're polling) ---- -# Use Docker DNS on umbrel_main_network so Datum can be recreated without +# Use Docker DNS on Datum's app network so Datum can be recreated without # changing a stale container IP. -DATUM_URL=http://datum_datum_1:21000 +DATUM_URL=http://datum:21000 DATUM_ADMIN_USER=admin DATUM_ADMIN_PASSWORD= # How often to scrape /clients (ms). Datum updates per-worker hashrate every diff --git a/README.md b/README.md index 98d4498..c5d6380 100644 --- a/README.md +++ b/README.md @@ -46,13 +46,15 @@ Allowlist of npubs is set via `NOSTR_ALLOWED_NPUBS`. Anything else is rejected b - Repository URL: `https://git.tx1138.com/lfg2025/gashboard` - Compose path: `docker-compose.yml` - Add env vars (see `.env.example`) - - Remove any old `DATUM_URL=http://10.21...` value from the stack env vars. + - Remove any old `DATUM_URL=http://10.21...` or + `DATUM_URL=http://datum_datum_1:21000` value from the stack env vars. Leave `DATUM_URL` unset unless your Datum container name is different. By - default the stack uses `http://datum_datum_1:21000` on Umbrel's - `umbrel_main_network`, so Datum can be recreated without changing a stale + default the stack uses `http://datum:21000` on Datum's `datum_default` + app network, so Datum can be recreated without changing a stale IP address. - - If your Umbrel install uses a different Datum container name, set - `DATUM_URL=http://:21000`. + - If your Umbrel install uses a different Datum app network or service name, + update `datum_default` in `docker-compose.yml` or set + `DATUM_URL=http://:21000`. 4. Open the dashboard, log in with one of the allowed npubs, watch your boards lose at hashing in style. diff --git a/docker-compose.yml b/docker-compose.yml index bfc5901..2c67cf6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ # gashboard — deploy as a Portainer Stack on the same Umbrel host that runs Datum. # -# Join Umbrel's shared Docker network so the API can reach Datum by container -# DNS name instead of a changing container IP. +# Join Datum's app network so the API can reach Datum by its stable Compose +# service DNS name instead of a changing container IP. services: gashboard: @@ -21,9 +21,9 @@ services: PORT: "1337" LOG_LEVEL: "${LOG_LEVEL:-info}" CORS_ORIGIN: "${CORS_ORIGIN:-}" - # Reach the Datum gateway container through Docker DNS on Umbrel's shared + # Reach the Datum gateway container through Docker DNS on Datum's app # network. This avoids hard-coding Datum's changing container IP. - DATUM_URL: "${DATUM_URL:-http://datum_datum_1:21000}" + DATUM_URL: "${DATUM_URL:-http://datum:21000}" DATUM_ADMIN_USER: "${DATUM_ADMIN_USER:-admin}" DATUM_ADMIN_PASSWORD: "${DATUM_ADMIN_PASSWORD?must be set}" DATUM_POLL_INTERVAL_MS: "${DATUM_POLL_INTERVAL_MS:-5000}" @@ -34,7 +34,7 @@ services: ports: - "${PORT:-1337}:1337" networks: - - umbrel_main_network + - datum_default healthcheck: test: ["CMD", "wget", "-qO-", "http://127.0.0.1:1337/healthz"] interval: 30s @@ -43,5 +43,5 @@ services: start_period: 15s networks: - umbrel_main_network: + datum_default: external: true