libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 515ca78ec9e5c3b644af22e9a788c4fa20a8206a
parent 4cef7419c3b2f23ce4e9b3d4eff2e278b853b0b1
Author: MS <ms@taler.net>
Date:   Fri,  3 Mar 2023 19:01:06 +0100

Debian package.

Shipping the demobank SPA along LibEuFin.

Diffstat:
MMakefile | 10+++++++++-
Acontrib/get_spa.sh | 21+++++++++++++++++++++
Mdebian/etc/nginx/sites-available/libeufin-sandbox.conf | 20+++++++++++---------
3 files changed, 41 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile @@ -23,8 +23,16 @@ exec-arch: @$(call versions_check) @./gradlew -q execArch +.PHONY: clean-spa +clean-spa: + @rm -fr debian/usr/share/libeufin/demobank-ui/index.* + +.PHONY: get-spa +get-spa: + @./contrib/get_spa.sh + .PHONY: deb -deb: exec-arch +deb: exec-arch get-spa @dpkg-buildpackage -rfakeroot -b -uc -us diff --git a/contrib/get_spa.sh b/contrib/get_spa.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# This script is in the public domain. To be +# invoked by "make dl-spa". + +if ! test -d .git; then + echo Make sure that CWD is the repository top-level dir. + exit 1 +fi + +if ls debian/usr/share/libeufin/demobank-ui/index.{html,css,js} &> /dev/null; then + echo SPA download already, run 'make clean-spa' to remove it. + exit 0 +fi + +if ! wget --version &> /dev/null; then + echo wget not found, aborting. + exit 1 +fi + +wget --content-disposition "https://git.taler.net/wallet-core.git/plain/demobank/index"{.css,.js,.html}"?h=prebuilt" -P debian/usr/share/libeufin/demobank-ui/ diff --git a/debian/etc/nginx/sites-available/libeufin-sandbox.conf b/debian/etc/nginx/sites-available/libeufin-sandbox.conf @@ -17,21 +17,23 @@ server { # Doesn't take requests away from the backend, # because that expects always a "/demobanks/default" # prefix. - rewrite ^/$ /webui/index.html; - - # FRONTEND - location /webui { - # This location has both the SPA HTML and the - # JavaScript configuration demobank-ui-settings.js - alias /usr/share/taler/demobank-ui; - } + # rewrite ^/$ /webui/index.html; # BACKEND - location / { + location /demobanks/default { # NOTE: urgently change to 'https' once TLS has been configured. proxy_set_header X-Forwarded-Proto "$scheme"; proxy_set_header X-Forwarded-Host "localhost"; proxy_set_header X-Forwarded-Prefix /; proxy_pass http://localhost:5000/; } + # rewrite ^/$ /index.html; + # FRONTEND + location / { + # This location has both the SPA HTML and the + # JavaScript configuration demobank-ui-settings.js + index index.html; + alias /usr/share/libeufin/demobank-ui/; + } + }