Restore Datum current-IP deployment
This commit is contained in:
11
.env.example
11
.env.example
@@ -12,13 +12,12 @@ LOG_LEVEL=info
|
||||
# to ../web/dist relative to the running api bundle.
|
||||
# STATIC_DIR=
|
||||
|
||||
# Host port exposed by the Portainer stack.
|
||||
GASHBOARD_PORT=1337
|
||||
|
||||
# ---- Datum gateway (the Umbrel app we're polling) ----
|
||||
# The stack joins Umbrel's real Docker network, so use Datum's container name.
|
||||
# Do not hard-code Datum's container IP; it can change after reboot.
|
||||
DATUM_URL=http://datum_datum_1:21000
|
||||
# Umbrel/Portainer stacks cannot reliably resolve Datum's container name.
|
||||
# Use Datum's current IP on umbrel_main_network and refresh it if Umbrel
|
||||
# recreates the Datum container:
|
||||
# docker inspect -f '{{.NetworkSettings.Networks.umbrel_main_network.IPAddress}}' datum_datum_1
|
||||
DATUM_URL=http://10.21.0.11:21000
|
||||
DATUM_ADMIN_USER=admin
|
||||
DATUM_ADMIN_PASSWORD=
|
||||
# How often to scrape /clients (ms). Datum updates per-worker hashrate every
|
||||
|
||||
@@ -46,12 +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`)
|
||||
- The stack attaches to the Umbrel network attached to `datum_datum_1`:
|
||||
- Set `DATUM_URL` to Datum's current container IP:
|
||||
```bash
|
||||
docker inspect -f '{{range $name, $_ := .NetworkSettings.Networks}}{{$name}}{{"\n"}}{{end}}' datum_datum_1
|
||||
docker inspect -f '{{.NetworkSettings.Networks.umbrel_main_network.IPAddress}}' 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 uses Docker DNS and avoids Umbrel's host proxy and stale container IPs.
|
||||
- Use it as `DATUM_URL=http://<that-ip>:21000`.
|
||||
- If Datum/Umbrel recreates the container, refresh this IP in Portainer and redeploy.
|
||||
|
||||
4. Open the dashboard, log in with one of the allowed npubs, watch your boards lose at hashing in style.
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ version: "3.9"
|
||||
|
||||
# gashboard — deploy as a Portainer Stack on the same Umbrel host that runs Datum.
|
||||
#
|
||||
# Attach to Umbrel's real app network so Docker DNS can resolve Datum by
|
||||
# container name. This avoids hard-coding Datum's container IP, which can change
|
||||
# after reboot and cause ECONNREFUSED.
|
||||
# Umbrel's Portainer setup cannot reliably resolve Umbrel app container names
|
||||
# from repository stacks. Use host networking and point DATUM_URL at Datum's
|
||||
# current container IP on umbrel_main_network.
|
||||
|
||||
services:
|
||||
gashboard:
|
||||
@@ -24,9 +24,10 @@ services:
|
||||
PORT: "1337"
|
||||
LOG_LEVEL: "${LOG_LEVEL:-info}"
|
||||
CORS_ORIGIN: "${CORS_ORIGIN:-}"
|
||||
# Reach the Datum gateway container directly over Umbrel's Docker network.
|
||||
# Do not use a hard-coded container IP; it can change after reboot.
|
||||
DATUM_URL: "${DATUM_URL:-http://datum_datum_1:21000}"
|
||||
# Reach the Datum gateway container directly. Refresh this IP if Umbrel
|
||||
# recreates Datum:
|
||||
# docker inspect -f '{{.NetworkSettings.Networks.umbrel_main_network.IPAddress}}' datum_datum_1
|
||||
DATUM_URL: "${DATUM_URL?must be set, e.g. http://10.21.0.11: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,17 +35,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:
|
||||
- "${GASHBOARD_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