Use Umbrel DNS for Datum polling

This commit is contained in:
Dorian
2026-05-09 16:41:33 +01:00
parent 99bbd83c34
commit 4b28f760c5
5 changed files with 23 additions and 159 deletions

View File

@@ -1,7 +1,7 @@
# gashboard — deploy as a Portainer Stack on the same Umbrel host that runs Datum.
#
# Uses the Docker socket to discover Datum's current IP on Umbrel's shared
# Docker network, avoiding stale hard-coded container IPs.
# Joins Umbrel's shared Docker network so the API can reach Datum through
# Docker DNS instead of a changing container IP.
services:
gashboard:
@@ -21,11 +21,9 @@ services:
PORT: "1337"
LOG_LEVEL: "${LOG_LEVEL:-info}"
CORS_ORIGIN: "${CORS_ORIGIN:-}"
# Fallback URL. With DATUM_DOCKER_* set below, the API resolves Datum's
# current container IP before polling.
DATUM_URL: "${DATUM_URL:-http://datum_datum_1:21000}"
DATUM_DOCKER_CONTAINER: "${DATUM_DOCKER_CONTAINER:-datum_datum_1}"
DATUM_DOCKER_NETWORK: "${DATUM_DOCKER_NETWORK:-umbrel_main_network}"
# Datum's service alias on Umbrel's shared app network. Override this if
# your Umbrel install exposes a different DNS name.
DATUM_URL: "${DATUM_URL:-http://datum: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}"
@@ -33,13 +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
user: "0:0"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
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