fix: serve SPA from apps/web/dist (matches server default) + use Datum IP
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>
This commit is contained in:
@@ -16,7 +16,7 @@ LOG_LEVEL=info
|
||||
# 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://datum_datum_1:21000
|
||||
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
|
||||
|
||||
@@ -37,7 +37,7 @@ COPY apps/api/package.json apps/api/
|
||||
RUN pnpm install --filter @gashboard/api --prod --frozen-lockfile
|
||||
|
||||
COPY --from=build-api /app/apps/api/dist apps/api/dist
|
||||
COPY --from=build-web /app/apps/web/dist apps/api/public
|
||||
COPY --from=build-web /app/apps/web/dist apps/web/dist
|
||||
|
||||
USER node
|
||||
EXPOSE 1337
|
||||
|
||||
@@ -20,7 +20,10 @@ services:
|
||||
PORT: "1337"
|
||||
LOG_LEVEL: "${LOG_LEVEL:-info}"
|
||||
CORS_ORIGIN: "${CORS_ORIGIN:-}"
|
||||
DATUM_URL: "${DATUM_URL:-http://datum_datum_1:21000}"
|
||||
# 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}"
|
||||
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}"
|
||||
|
||||
Reference in New Issue
Block a user