diff options
author | MS <ms@taler.net> | 2022-10-21 13:23:47 +0200 |
---|---|---|
committer | MS <ms@taler.net> | 2022-10-21 13:23:47 +0200 |
commit | 772f50c54f5cefb0bd9fc8eb7539cf4928665d6f (patch) | |
tree | 00d0262dc7708cd1784c120ac0f3c45a06eea5d2 /docker/hybrid | |
parent | 6c0c47eec71b5f572c81f39233fd9d22bdfd0bfb (diff) | |
download | deployment-772f50c54f5cefb0bd9fc8eb7539cf4928665d6f.tar.gz deployment-772f50c54f5cefb0bd9fc8eb7539cf4928665d6f.tar.bz2 deployment-772f50c54f5cefb0bd9fc8eb7539cf4928665d6f.zip |
Data export: readme and path fix.
Diffstat (limited to 'docker/hybrid')
-rw-r--r-- | docker/hybrid/README | 13 | ||||
-rw-r--r-- | docker/hybrid/docker-compose.yml | 4 | ||||
-rw-r--r-- | docker/hybrid/images/exchange/taler.conf | 2 | ||||
-rw-r--r-- | docker/hybrid/images/libeufin/startup.sh | 7 | ||||
-rw-r--r-- | docker/hybrid/images/postgres/Dockerfile | 2 |
5 files changed, 20 insertions, 8 deletions
diff --git a/docker/hybrid/README b/docker/hybrid/README index 9071e65..77da82c 100644 --- a/docker/hybrid/README +++ b/docker/hybrid/README @@ -50,7 +50,18 @@ for an example. Volumes ------- -TBD: write how to export data. +Data is kept into Docker volumes. Run the following command to +export database, key material, and logs: + +$ docker run \ + -v /tmp:/tmp \ + -v hybrid_talerdata:/taler-data \ + -v hybrid_talerlogs:/taler-logs \ + -it debian:stable \ + /bin/bash -c "tar --no-same-owner --no-same-permissions -c -f /tmp/backup.tar /taler-data /taler-logs" + +If it succeeded, the file "/tmp/backup.tar" on the host system +should now contain the data coming from the volumes. Run --- diff --git a/docker/hybrid/docker-compose.yml b/docker/hybrid/docker-compose.yml index f048ce4..21fc7af 100644 --- a/docker/hybrid/docker-compose.yml +++ b/docker/hybrid/docker-compose.yml @@ -14,9 +14,9 @@ services: - talerdata:/var/lib/postgresql/data/ - ${TALER_DEPLOYMENT_CONFIG:?Please export TALER_DEPLOYMENT_CONFIG}:/config/deployment.conf environment: - # the only 'role' existing in the DBMS. That + # root is the only role existing in the DBMS. That # matches the role used by other containers when - # they connect here. + # they connect to the database. POSTGRES_USER: root # this changes to the password used by other # containers to connect here. This definition diff --git a/docker/hybrid/images/exchange/taler.conf b/docker/hybrid/images/exchange/taler.conf index e905898..b19f97e 100644 --- a/docker/hybrid/images/exchange/taler.conf +++ b/docker/hybrid/images/exchange/taler.conf @@ -2,7 +2,7 @@ currency = __CURRENCY__ [paths] -taler_data_home = /data +taler_data_home = /data/exchange [taler-exchange-secmod-eddsa] unixpath = /eddsa.http diff --git a/docker/hybrid/images/libeufin/startup.sh b/docker/hybrid/images/libeufin/startup.sh index d3312b6..ca66f0c 100644 --- a/docker/hybrid/images/libeufin/startup.sh +++ b/docker/hybrid/images/libeufin/startup.sh @@ -8,6 +8,7 @@ SANDBOX_PORT=15000 NEXUS_PORT=15001 SANDBOX_BASE_URL="http://localhost:${SANDBOX_PORT}" EXCHANGE_URL="http://exchange/" +MAYBE_VOLUME_MOUNTPOINT="/data/libeufin" # As wanted by the Libeufin CLI: export LIBEUFIN_SANDBOX_URL="${SANDBOX_BASE_URL}/demobanks/default" export LIBEUFIN_NEXUS_URL="http://localhost:${NEXUS_PORT}" @@ -39,9 +40,9 @@ is_serving() { fi echo $2 reachable. } - EXCHANGE_IBAN=DE159593 -export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:/data/sandbox.sqlite3" +mkdir -p ${MAYBE_VOLUME_MOUNTPOINT} +export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:${MAYBE_VOLUME_MOUNTPOINT}/sandbox.sqlite3" export LIBEUFIN_SANDBOX_ADMIN_PASSWORD=secret echo -n "Creating ${CURRENCY} default demobank..." libeufin-sandbox config --currency ${CURRENCY} default @@ -77,7 +78,7 @@ echo DONE ## NEXUS SETUP EXCHANGE_NEXUS_USERNAME=`taler-config -c /config/deployment.conf -s taler-deployment -o exchange-nexus-username` EXCHANGE_NEXUS_PASSWORD=`taler-config -c /config/deployment.conf -s taler-deployment -o exchange-nexus-password` -export LIBEUFIN_NEXUS_DB_CONNECTION="jdbc:sqlite:/data/nexus.sqlite3" +export LIBEUFIN_NEXUS_DB_CONNECTION="jdbc:sqlite:${MAYBE_VOLUME_MOUNTPOINT}/nexus.sqlite3" echo -n "Creating Nexus superuser..." libeufin-nexus superuser $EXCHANGE_NEXUS_USERNAME \ --password $EXCHANGE_NEXUS_PASSWORD diff --git a/docker/hybrid/images/postgres/Dockerfile b/docker/hybrid/images/postgres/Dockerfile index e6588e8..d0fde23 100644 --- a/docker/hybrid/images/postgres/Dockerfile +++ b/docker/hybrid/images/postgres/Dockerfile @@ -1,7 +1,7 @@ FROM docker.io/postgres # Default "${PGDATA}/log" directory was problematic -# when mounted in a volume. +# when mounted in a volume. Prefer arbitrary "/logs". RUN mkdir /logs RUN chown postgres:postgres /logs |