taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit 9d4838faf34d0dd792a7d4881ab83f195279251f
parent 7838a2e1ccf6b11f052759c6499dec2cd0d13678
Author: MS <ms@taler.net>
Date:   Sun, 26 Nov 2023 09:37:33 +0100

monitor API container

populating the database with random payments and
launching the bank, to let external clients test
the API

Diffstat:
Anlnet/task4/Dockerfile | 43+++++++++++++++++++++++++++++++++++++++++++
Anlnet/task4/launch.sh | 7+++++++
Anlnet/task4/start.sh | 17+++++++++++++++++
3 files changed, 67 insertions(+), 0 deletions(-)

diff --git a/nlnet/task4/Dockerfile b/nlnet/task4/Dockerfile @@ -0,0 +1,43 @@ +FROM debian:stable + +RUN apt-get update +RUN apt-get install -y \ + git \ + openjdk-17-jre \ + python3-pip \ + curl \ + jq \ + postgresql \ + python3-requests \ + python3-click \ + sudo \ + time \ + autoconf \ + autopoint \ + libtool \ + texinfo \ + libgcrypt-dev \ + libidn11-dev \ + zlib1g-dev \ + libunistring-dev \ + libjansson-dev \ + recutils \ + libsqlite3-dev \ + libpq-dev \ + libcurl4-openssl-dev \ + libsodium-dev \ + libqrencode-dev \ + zip + +# Installation +RUN git clone git://git.taler.net/libeufin +WORKDIR /libeufin +# RUN git fetch && git checkout MONITOR-TAG +RUN ./bootstrap +RUN ./configure --prefix=/usr/local +RUN make install +RUN apt-get install -y socat +RUN apt-get install -y netcat-openbsd +WORKDIR / +COPY start.sh / +ENTRYPOINT ["/start.sh"] diff --git a/nlnet/task4/launch.sh b/nlnet/task4/launch.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Binds the container internal port 8080 to the host's. + +set -eu + +docker run -p 8080:8080 -it monitor diff --git a/nlnet/task4/start.sh b/nlnet/task4/start.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -eu + +service postgresql start +sudo -u postgres createuser -s root +createdb libeufinbank +cat << EOF > /usr/bin/taler-config +#!/bin/bash + +echo postgresql:///libeufinbank +EOF +chmod +x /usr/bin/taler-config +libeufin-bank dbinit -c /libeufin/contrib/libeufin-bank.conf +/libeufin/contrib/populate-stats.sh /libeufin/contrib/libeufin-bank.conf +libeufin-bank passwd admin nlnet +libeufin-bank serve