Use Datum service network for API polling
This commit is contained in:
@@ -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
|
||||
|
||||
12
README.md
12
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://<container-name>: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://<service-name>:21000`.
|
||||
|
||||
4. Open the dashboard, log in with one of the allowed npubs, watch your boards lose at hashing in style.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user