feat(apps): package DATUM with stable service discovery

This commit is contained in:
yaya
2026-10-06 06:42:01 +01:00
parent cedfbb2b07
commit 2a2a4552f7
11 changed files with 304 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
set -eu
umask 077
: "${BITCOIN_RPC_HOST:?Bitcoin host is required}"
: "${BITCOIN_RPC_PASSWORD:?Bitcoin RPC password is required}"
: "${DATUM_ADMIN_PASSWORD:?Datum admin password is required}"
# Keep operator settings, including the payout address, across recreation.
# Refresh platform-owned credentials and DNS names on every container start.
config=/data/config.json
if [ ! -e "$config" ]; then printf '{}\n' > "$config"; fi
tmp=$(mktemp /data/config.json.XXXXXX)
trap 'rm -f "$tmp"' EXIT HUP INT TERM
jq -e -f /app/configure.jq "$config" > "$tmp"
mv "$tmp" "$config"
exec /app/datum_gateway --config "$config"