From e47b07f78069e2e1445b0dd9e8ea452446ab39f7 Mon Sep 17 00:00:00 2001 From: Dorian Date: Wed, 6 May 2026 17:25:14 +0100 Subject: [PATCH] fix(deploy): use datum container dns --- README.md | 7 ++++++- docker-compose.yml | 17 +++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3a5269d..9fd908b 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,12 @@ 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`) - - Set the `external` network in the compose file to match your Datum app's docker network (find with `docker network ls` on the Umbrel) + - Set `DATUM_NETWORK` to the network attached to `datum_datum_1`: + ```bash + docker inspect -f '{{range $name, $_ := .NetworkSettings.Networks}}{{$name}}{{"\n"}}{{end}}' datum_datum_1 + ``` + - On Umbrel this is usually `umbrel_main_network`, which is the compose default. + - Leave `DATUM_URL` unset unless you need to override it. The default is `http://datum_datum_1:21000`, which avoids Umbrel's host proxy and stale container IPs. 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 f64049c..f7f99a9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,9 @@ version: "3.9" # gashboard — deploy as a Portainer Stack on the same Umbrel host that runs Datum. -# IMPORTANT: set `networks.datum.name` below to the actual docker network the -# Datum app uses (find it on the Umbrel with `docker network ls | grep datum`). +# IMPORTANT: set DATUM_NETWORK to the actual Docker network used by datum_datum_1. +# Find it with: +# docker inspect -f '{{range $name, $_ := .NetworkSettings.Networks}}{{$name}}{{"\n"}}{{end}}' datum_datum_1 services: gashboard: @@ -22,10 +23,9 @@ services: PORT: "1337" LOG_LEVEL: "${LOG_LEVEL:-info}" CORS_ORIGIN: "${CORS_ORIGIN:-}" - # Direct container IP from umbrel_main_network. Bypasses Docker DNS - # (which doesn't reliably alias container names across stacks). If your - # Datum container moves to a different IP, override DATUM_URL in env. - DATUM_URL: "${DATUM_URL:-http://10.21.0.11:21000}" + # Reach the Datum gateway container directly on its Docker network. + # Do not use the Umbrel host proxy here; it serves the Umbrel web shell. + DATUM_URL: "${DATUM_URL:-http://datum_datum_1: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}" @@ -41,9 +41,10 @@ services: retries: 3 start_period: 15s networks: - - umbrel_main_network + - datum_network - default networks: - umbrel_main_network: + datum_network: external: true + name: "${DATUM_NETWORK:-umbrel_main_network}"