sandcastle-ng

Scripts for the deployment of Sandcastle (GNU Taler)
Log | Files | Refs | README

commit 092b01e9f517a96543f8b20422cfd1e69ab05475
parent 7d492fae094befa19003374d91ed1863ae9b6ea0
Author: Florian Dold <florian@dold.me>
Date:   Thu, 25 Sep 2025 11:44:07 +0200

starting point for donau integration

Diffstat:
MDockerfile | 26+++++++++++++++++++++++++-
Mbuildconfig/merchant.tag | 2+-
Mbuildconfig/wallet.tag | 2+-
Mscripts/demo/setup-sandcastle.sh | 40++++++++++++++++++++++++++++++++++++++++
4 files changed, 67 insertions(+), 3 deletions(-)

diff --git a/Dockerfile b/Dockerfile @@ -150,8 +150,29 @@ RUN rm -rf /build RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install --no-install-recommends -y /packages/exchange/*.deb WORKDIR / +# Donau +FROM exchange as donau +COPY buildconfig/donau.* /buildconfig/ +WORKDIR /build +RUN TAG=$(cat /buildconfig/donau.tag) && \ + git clone git://git.taler.net/donau \ + --branch $TAG && \ + cd donau && git checkout $(cat /buildconfig/donau.checkout) +WORKDIR /build/donau +RUN ./bootstrap && \ + ./configure --prefix=/usr \ + --disable-doc +RUN dpkg-buildpackage -rfakeroot -b -uc -us +WORKDIR / +RUN mkdir -p /packages/donau +RUN mv /build/*.deb /packages/donau +RUN rm -rf /build +RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install --no-install-recommends -y /packages/donau/*.deb +WORKDIR / + # Merchant -FROM exchange as merchant +# FROM exchange as merchant +FROM donau as merchant COPY buildconfig/merchant.* /buildconfig/ WORKDIR /build @@ -307,6 +328,7 @@ COPY --from=wallet /packages/wallet/* /packages/ COPY --from=libeufin /packages/libeufin/* /packages/ COPY --from=merchant-demos /packages/merchant-demos/* /packages/ COPY --from=challenger /packages/challenger/* /packages/ +COPY --from=donau /packages/donau/* /packages/ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y upgrade && \ apt-get install --no-install-recommends -y /packages/*.deb COPY systemd/setup-sandcastle.service /etc/systemd/system/ @@ -315,3 +337,5 @@ RUN systemctl enable setup-sandcastle.service RUN systemctl disable postgresql && \ systemctl disable apache2 || true RUN sed -i /etc/postgresql/15/main/postgresql.conf -e 's/^port[ ]*=.*$/port = 5432/' +# Not ready yet! +RUN systemctl disable taler-mailbox diff --git a/buildconfig/merchant.tag b/buildconfig/merchant.tag @@ -1 +1 @@ -v1.0.13 +v1.0.13-dev.2 diff --git a/buildconfig/wallet.tag b/buildconfig/wallet.tag @@ -1 +1 @@ -v1.0.34 +v1.0.35-dev.1 diff --git a/scripts/demo/setup-sandcastle.sh b/scripts/demo/setup-sandcastle.sh @@ -81,6 +81,7 @@ LANDING_DOMAIN=$MYDOMAIN BANK_DOMAIN=bank.$MYDOMAIN EXCHANGE_DOMAIN=exchange.$MYDOMAIN MERCHANT_DOMAIN=backend.$MYDOMAIN +DONAU_DOMAIN=donau.$MYDOMAIN BLOG_DOMAIN=shop.$MYDOMAIN DONATIONS_DOMAIN=donations.$MYDOMAIN CHALLENGER_DOMAIN=challenger.$MYDOMAIN @@ -101,6 +102,7 @@ PORT_INTERNAL_PROVISION=8504 PORT_INTERNAL_BANK_SPA=8505 PORT_INTERNAL_CHALLENGER=8506 PORT_INTERNAL_AUDITOR=8507 +PORT_INTERNAL_DONAU=8508 ENABLE_AUDITOR=0 @@ -532,6 +534,12 @@ cat <<EOF >/etc/caddy/Caddyfile } } +:$PORT_INTERNAL_DONAU { + reverse_proxy unix//run/donau/httpd/http.sock { + header_up X-Forwarded-Proto "https" + } +} + :$PORT_INTERNAL_BANK_SPA { root * /usr/share/libeufin/spa root /settings.json /etc/libeufin/ @@ -591,6 +599,13 @@ https://$MERCHANT_DOMAIN { } } +https://$DONAU_DOMAIN { + tls internal + reverse_proxy unix//run/donau/httpd/http.sock { + header_up X-Forwarded-Proto "https" + } +} + https://$AUDITOR_DOMAIN { tls internal reverse_proxy unix//run/taler-auditor/httpd/auditor-http.sock @@ -624,6 +639,10 @@ http://$MERCHANT_DOMAIN$PORT_SUFFIX { reverse_proxy unix//run/taler-merchant/httpd/merchant-http.sock } +http://$DONAU_DOMAIN$PORT_SUFFIX { + reverse_proxy unix//run/donau/httpd/http.sock +} + http://$AUDITOR_DOMAIN$PORT_SUFFIX { reverse_proxy unix//run/taler-auditor/httpd/auditor-http.sock } @@ -950,6 +969,27 @@ for lang in "${langs[@]}"; do }" done + + +# Set up Donau + +cat <<EOF >/etc/donau/conf.d/sandcastle.conf +[donau] +CURRENCY = $CURRENCY +LEGAL_DOMAIN = Gnuland +EOF + +donau-dbconfig + +if [[ ! -e /etc/donau/conf.d/sandcastle-$CURRENCY-units.conf ]]; then + # Only create if necessary + taler-harness deployment gen-doco-config \ + --min-amount "${CURRENCY}:0.01" \ + --max-amount "${CURRENCY}:100" \ + >"/etc/donau/conf.d/sandcastle-$CURRENCY-units.conf" +fi + + # Now we set up the taler-merchant-demos systemctl enable --now taler-demo-landing