Files
gashboard/docker-compose.yml
Dorian b827f89dcd 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>
2026-05-06 16:47:56 +01:00

51 lines
1.8 KiB
YAML

version: "3.9"
# gashboard — deploy as a Portainer Stack on the same Umbrel host that runs Datum.
# IMPORTANT: set `networks.datum.name` below to the actual docker network the
# Datum app uses (find it on the Umbrel with `docker network ls | grep datum`).
services:
gashboard:
# Portainer "Stacks → Repository" will build this from the gashboard git repo.
# If you want to pull a pre-built image instead, comment out `build:` and
# set `image:` to your registry tag.
build:
context: .
dockerfile: Dockerfile
image: gashboard:0.1.0
container_name: gashboard
restart: unless-stopped
environment:
NODE_ENV: production
PORT: "1337"
LOG_LEVEL: "${LOG_LEVEL:-info}"
CORS_ORIGIN: "${CORS_ORIGIN:-}"
# 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}"
NOSTR_ALLOWED_NPUBS: "${NOSTR_ALLOWED_NPUBS?must be set}"
JWT_SECRET: "${JWT_SECRET?must be set}"
JWT_TTL_SECONDS: "${JWT_TTL_SECONDS:-86400}"
ports:
- "1337:1337"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:1337/healthz"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
networks:
- umbrel_main
- default
networks:
umbrel_main:
external: true
# Datum container on this Umbrel sits on `umbrel_main_network` (10.21.0.0/16).
# Confirmed via `docker network ls` on the Umbrel host.
name: umbrel_main_network