commit 5378665d64224c25e8c2f16bee1a4eb743fa7458
parent bb5397da2368811d32b7b901420a10bd87829f0d
Author: Florian Dold <florian@dold.me>
Date: Wed, 10 Jan 2024 19:36:38 +0100
sandcastle-ng: fix override loading
Diffstat:
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/sandcastle-run b/sandcastle-run
@@ -42,6 +42,12 @@ else
OVERRIDES=""
fi
+# Beware: It is futile to pass environment variables to the container here,
+# as they will not be available in the systemd unit that provisions the
+# services in the container.
+# That's why we mount the right start-up script and override
+# to a well-known location.
+
podman run \
-d \
-p=$SANDCASTLE_PORT_MERCHANT:$PORT_INTERNAL_MERCHANT \
@@ -54,7 +60,6 @@ podman run \
-p=$SANDCASTLE_PORT_BANK_SPA:$PORT_INTERNAL_BANK_SPA \
--name taler-sandcastle \
--systemd=always \
- --env "SANDCASTLE_OVERRIDE_NAME=${SANDCASTLE_OVERRIDE_NAME:=none}" \
-v talerdata:/talerdata:Z \
$OVERRIDES \
-v $PWD/scripts:/scripts:Z \
diff --git a/scripts/demo/setup-sandcastle.sh b/scripts/demo/setup-sandcastle.sh
@@ -21,10 +21,10 @@ echo "Provisioning sandcastle"
# Might eventually be moved to an external file.
# Source any ovverrides from external file
-if [[ "${SANDCASTLE_OVERRIDE_NAME:-}" != "none" ]]; then
- cat /overrides
- source "/overrides" || true
+if [[ -e /overrides ]]; then
+ source /overrides
fi
+
CURRENCY=${CURRENCY:="KUDOS"}
EXCHANGE_IBAN=DE159593
EXCHANGE_PLAIN_PAYTO=payto://iban/$EXCHANGE_IBAN