Two production-blocker bugs from the first deploy:
1. Static SPA never served — Dockerfile copied apps/web/dist into
apps/api/public, but server.ts default static dir resolves to
apps/web/dist. Mismatch meant every route fell through to Express'
bare 404 ("Cannot GET /"). Aligning Dockerfile to the default path.
2. DNS for the Datum container name failed (getaddrinfo ENOTFOUND
datum_datum_1) — gashboard's Docker DNS doesn't reliably alias
external-network container names across compose stacks. Switch the
default DATUM_URL to the container's known IP on umbrel_main_network
(10.21.0.11, captured during earlier diagnostics). If the IP changes
the user can override DATUM_URL in env. If gashboard isn't actually
joined to umbrel_main_network, the next failure will be a much more
diagnostic ECONNREFUSED instead of an opaque ENOTFOUND.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
35 lines
1.4 KiB
Plaintext
35 lines
1.4 KiB
Plaintext
# gashboard configuration
|
|
# Copy to .env (or set in Portainer stack env) and fill in values.
|
|
|
|
# ---- Server ----
|
|
PORT=1337
|
|
NODE_ENV=production
|
|
LOG_LEVEL=info
|
|
# Origin allowed by CORS. Leave unset to disable CORS entirely (single-origin
|
|
# deploy where the API serves the SPA from the same host).
|
|
# CORS_ORIGIN=https://gashboard.example.com
|
|
# Override the static dir the API serves the built SPA from. Default resolves
|
|
# to ../web/dist relative to the running api bundle.
|
|
# STATIC_DIR=
|
|
|
|
# ---- Datum gateway (the Umbrel app we're polling) ----
|
|
# Reachable internally inside Umbrel's docker network. From your LAN it's also
|
|
# at http://192.168.1.191:21000 but that path goes through umbrelOS auth.
|
|
# Inside the Umbrel docker network, use the Datum service hostname directly.
|
|
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
|
|
# few seconds; 5s is a sane default.
|
|
DATUM_POLL_INTERVAL_MS=5000
|
|
|
|
# ---- Nostr auth ----
|
|
# Comma-separated bech32 npubs allowed to log in. Anything else is rejected
|
|
# at NIP-98 verification, before any session is issued.
|
|
NOSTR_ALLOWED_NPUBS=npub19tfnjfvxzt45jrz78mr3cldrtlg8pj5kp6gshp37582xcj7a0ctq7c8d7j,npub10wzfa7jkqj6c65xyr93hhxrns37ml9tss82jvymv8fymwdtu6cts3h6pvr
|
|
|
|
# ---- Sessions ----
|
|
# 32+ random bytes, hex. Generate with: openssl rand -hex 32
|
|
JWT_SECRET=
|
|
JWT_TTL_SECONDS=86400
|