diff options
author | Lukas Grossberger <code@grossberger.xyz> | 2021-01-30 14:42:39 +0100 |
---|---|---|
committer | Lukas Grossberger <code@grossberger.xyz> | 2021-01-30 14:55:07 +0100 |
commit | 58b1cdd88a93bf81a6a0d755310957b8eeeae3bf (patch) | |
tree | 2e34f8136f2df1811a5bca304f3e8d32a39d5992 | |
parent | 28515b193577688558d29f1e8dd1f517d36baf4b (diff) | |
download | libeufin-deployment-58b1cdd88a93bf81a6a0d755310957b8eeeae3bf.tar.gz libeufin-deployment-58b1cdd88a93bf81a6a0d755310957b8eeeae3bf.tar.bz2 libeufin-deployment-58b1cdd88a93bf81a6a0d755310957b8eeeae3bf.zip |
add basic docker setup for humans to follow setup documentation
-rw-r--r-- | docker/README.md | 57 | ||||
-rw-r--r-- | docker/apt_preferences | 15 | ||||
-rw-r--r-- | docker/libeufin.Dockerfile | 14 | ||||
-rw-r--r-- | docker/nexus.Dockerfile | 11 | ||||
-rw-r--r-- | docker/sandbox.Dockerfile | 9 |
5 files changed, 106 insertions, 0 deletions
diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000..0067477 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,57 @@ +# Docker Setup for GNU Taler LibEuFin + +This is meant as instructions for humans to run the different LibEuFin components +and examples from the documentation locally in Docker containers. + +This could become the bassis for an integration test style `docker-compose` setup. + + +## Build Docker images + +### Base image +``` +docker build -t libeufin:dev -f libeufin.Dockerfile . +``` + +### Component images +``` +docker build -t libeufin-sandbox:dev sandbox.Dockerfile . +docker build -t libeufin-nexus:dev nexus.Dockerfile . +``` + +## Scenario 1: Sandbox & CLI + +In this scenario, the sandbox version is started fully self contained with its own +internal database to respond to interactions via the commandline interface even without +an EBICS compatible bank account. + +Start the sandbox image with +``` +docker run -d --name libeufin-sandbox -p 5000:5000 libeufin-sandbox:dev +``` + +Start the base image for access to the CLI +``` +docker run -it libeufin:dev /bin/bash +``` + +And run the command as specified in the +[documentation](https://docs.taler.net/libeufin/nexus-tutorial.html#optional-configuring-the-sandbox) +(use the IP of the docker sandbox image i.e. the docker network adapter) +``` +export LIBEUFIN_SANDBOX_URL=http://172.17.0.1:5000/ +libeufin-cli sandbox check +``` + + +## [WIP] Scenario 2: Nexus + +In case one actually has an EBICS compatible bank account and desires to run the real +deal instead of the sandbox; +Start the nexus image with +``` +docker run -it -p 5001:5001 libeufin-nexus:dev /bin/bash +``` + +Inside this container, run the steps described in the +[documentation](https://docs.taler.net/libeufin/nexus-tutorial.html#connect-nexus-with-an-ebics-account). diff --git a/docker/apt_preferences b/docker/apt_preferences new file mode 100644 index 0000000..83b74fe --- /dev/null +++ b/docker/apt_preferences @@ -0,0 +1,15 @@ +Package: * +Pin: release a=stable +Pin-Priority: 700 + +Package: * +Pin: release a=testing +Pin-Priority: 650 + +Package: * +Pin: release a=unstable +Pin-Priority: 600 + +Package: * +Pin: release l=Debian-Security +Pin-Priority: 1000
\ No newline at end of file diff --git a/docker/libeufin.Dockerfile b/docker/libeufin.Dockerfile new file mode 100644 index 0000000..3aeaeb5 --- /dev/null +++ b/docker/libeufin.Dockerfile @@ -0,0 +1,14 @@ +FROM debian:sid + +# Base system setup +RUN apt-get update +RUN apt-get -y upgrade +RUN apt-get install -y gnupg2 wget + +# LibEuFin setup +COPY ./apt_preferences /etc/apt/preferences +RUN echo "deb https://deb.taler.net/apt/debian sid main" >> /etc/apt/sources.list +RUN wget -O - https://taler.net/static/taler-systems.gpg.key | apt-key add - +RUN apt-get update + +RUN apt-get install -y libeufin diff --git a/docker/nexus.Dockerfile b/docker/nexus.Dockerfile new file mode 100644 index 0000000..bc8fdd4 --- /dev/null +++ b/docker/nexus.Dockerfile @@ -0,0 +1,11 @@ +FROM libeufin:dev + +ENV PORT 5001 + +RUN echo "libeufin-nexus serve --port ${PORT}" >> /startup.sh \ + && chmod +x startup.sh + +CMD /startup.sh + +# TODO: Create super user from env arg; requires passing arg via env var or as cli arg +# RUN libeufin-nexus superuser $SUPERUSER_NAME $SUPERUSER_PASSWORD diff --git a/docker/sandbox.Dockerfile b/docker/sandbox.Dockerfile new file mode 100644 index 0000000..6b1e7a6 --- /dev/null +++ b/docker/sandbox.Dockerfile @@ -0,0 +1,9 @@ +FROM libeufin:dev + +ENV PORT 5000 +ENV LIBEUFIN_SANDBOX_DB_CONNECTION "jdbc:sqlite:/tmp/libeufintestdb" + +RUN echo "libeufin-sandbox serve --port ${PORT}" >> /startup.sh \ + && chmod +x startup.sh + +CMD /startup.sh |