Use host-published Datum admin port
This commit is contained in:
@@ -13,9 +13,8 @@ LOG_LEVEL=info
|
||||
# STATIC_DIR=
|
||||
|
||||
# ---- Datum gateway (the Umbrel app we're polling) ----
|
||||
# Datum's service alias on Umbrel's shared app network. Override if your Umbrel
|
||||
# install exposes a different DNS name.
|
||||
DATUM_URL=http://datum:21000
|
||||
# Datum's admin UI/API is published by Umbrel on the host at port 21000.
|
||||
DATUM_URL=http://127.0.0.1:21000
|
||||
DATUM_ADMIN_USER=admin
|
||||
DATUM_ADMIN_PASSWORD=
|
||||
# How often to scrape /clients (ms). Datum updates per-worker hashrate every
|
||||
|
||||
11
README.md
11
README.md
@@ -46,12 +46,11 @@ 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.
|
||||
By default the stack uses `http://datum:21000` on Umbrel's
|
||||
`umbrel_main_network`, so Datum can be recreated without changing a stale
|
||||
IP address.
|
||||
- If your Umbrel install exposes Datum under a different DNS name, set
|
||||
`DATUM_URL=http://<datum-dns-name>:21000`.
|
||||
- Remove any old `DATUM_URL=http://10.21...`,
|
||||
`DATUM_URL=http://datum...`, or `DATUM_URL=http://datum_datum_1...` value
|
||||
from the stack env vars.
|
||||
- By default the stack uses host networking and polls Datum through Umbrel's
|
||||
host-published admin port: `DATUM_URL=http://127.0.0.1:21000`.
|
||||
|
||||
4. Open the dashboard, log in with one of the allowed npubs, watch your boards lose at hashing in style.
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ export const config = {
|
||||
corsOrigin: parsed.CORS_ORIGIN,
|
||||
staticDir: parsed.STATIC_DIR,
|
||||
datum: {
|
||||
url: (parsed.DATUM_URL ?? "http://datum:21000").replace(/\/$/, ""),
|
||||
url: (parsed.DATUM_URL ?? "http://127.0.0.1:21000").replace(/\/$/, ""),
|
||||
adminUser: parsed.DATUM_ADMIN_USER,
|
||||
adminPassword: parsed.DATUM_ADMIN_PASSWORD,
|
||||
pollIntervalMs: parsed.DATUM_POLL_INTERVAL_MS,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# gashboard — deploy as a Portainer Stack on the same Umbrel host that runs Datum.
|
||||
#
|
||||
# Joins Umbrel's shared Docker network so the API can reach Datum through
|
||||
# Docker DNS instead of a changing container IP.
|
||||
# Uses host networking so the API can reach Datum through the port Umbrel
|
||||
# already publishes on the host, avoiding container DNS and changing IPs.
|
||||
|
||||
services:
|
||||
gashboard:
|
||||
@@ -21,9 +21,8 @@ services:
|
||||
PORT: "1337"
|
||||
LOG_LEVEL: "${LOG_LEVEL:-info}"
|
||||
CORS_ORIGIN: "${CORS_ORIGIN:-}"
|
||||
# Datum's service alias on Umbrel's shared app network. Override this if
|
||||
# your Umbrel install exposes a different DNS name.
|
||||
DATUM_URL: "${DATUM_URL:-http://datum:21000}"
|
||||
# Datum's admin UI/API is published by Umbrel on the host at port 21000.
|
||||
DATUM_URL: "${DATUM_URL:-http://127.0.0.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}"
|
||||
@@ -31,17 +30,10 @@ services:
|
||||
NOSTR_ALLOWED_NPUBS: "${NOSTR_ALLOWED_NPUBS?must be set}"
|
||||
JWT_SECRET: "${JWT_SECRET?must be set}"
|
||||
JWT_TTL_SECONDS: "${JWT_TTL_SECONDS:-86400}"
|
||||
ports:
|
||||
- "${PORT:-1337}:1337"
|
||||
networks:
|
||||
- umbrel_main_network
|
||||
network_mode: host
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:1337/healthz"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
|
||||
networks:
|
||||
umbrel_main_network:
|
||||
external: true
|
||||
|
||||
Reference in New Issue
Block a user