Stabilize Datum container networking

This commit is contained in:
Dorian
2026-05-09 16:26:18 +01:00
parent 7a85e805a7
commit 2bbb89c53f
4 changed files with 24 additions and 22 deletions

View File

@@ -1,10 +1,7 @@
version: "3.9"
# gashboard — deploy as a Portainer Stack on the same Umbrel host that runs Datum.
#
# 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.
# Join Umbrel's shared Docker network so the API can reach Datum by container
# DNS name instead of a changing container IP.
services:
gashboard:
@@ -24,10 +21,9 @@ services:
PORT: "1337"
LOG_LEVEL: "${LOG_LEVEL:-info}"
CORS_ORIGIN: "${CORS_ORIGIN:-}"
# 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}"
# Reach the Datum gateway container through Docker DNS on Umbrel's shared
# network. This avoids hard-coding Datum's changing container IP.
DATUM_URL: "${DATUM_URL:-http://datum_datum_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}"
@@ -35,10 +31,17 @@ services:
NOSTR_ALLOWED_NPUBS: "${NOSTR_ALLOWED_NPUBS?must be set}"
JWT_SECRET: "${JWT_SECRET?must be set}"
JWT_TTL_SECONDS: "${JWT_TTL_SECONDS:-86400}"
network_mode: host
ports:
- "${PORT:-1337}:1337"
networks:
- umbrel_main_network
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