commit 63045bc9bb7d599bf9ae68d943cad667fdf17c0f
parent 22797335c6f6bc1f82a06bdc0dfac9156179d2e3
Author: MS <ms@taler.net>
Date: Mon, 17 Oct 2022 20:57:55 +0200
docker-compose: data storage
Diffstat:
4 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/docker/hybrid/README b/docker/hybrid/README
@@ -111,3 +111,11 @@ env variable (see "How to run" section above).
[taler-deployment]
currency = EUR
+
+How to persist data on the host
+===============================
+
+The environment variable TALER_DEPLOYMENT_DATA controls
+where on the host's filesystem the services' data gets stored.
+It defaults to ~/taler-data, and contains exchange, libeufin,
+and postgresql data.
diff --git a/docker/hybrid/docker-compose.yml b/docker/hybrid/docker-compose.yml
@@ -6,6 +6,8 @@ services:
build: ./images/postgres
ports:
- 8888:5432
+ volumes:
+ - ${TALER_DEPLOYMENT_DATA:-~/taler-data}/postgresql:/var/lib/postgresql/data
exchange:
build: ./images/exchange
@@ -14,7 +16,8 @@ services:
ports:
- 5555:80
volumes:
- - ${TALER_DEPLOYMENT_CONFIG}:/config/deployment.conf
+ - ${TALER_DEPLOYMENT_CONFIG:?Please export TALER_DEPLOYMENT_CONFIG}:/config/deployment.conf
+ - ${TALER_DEPLOYMENT_DATA:-~/taler-data}/exchange:/data
merchant:
build: ./images/merchant
@@ -22,9 +25,9 @@ services:
- talerdb
ports:
- 5556:80
- - 5559:8080 # Blog
+ - 5559:8080 # Blog TBD.
volumes:
- - ${TALER_DEPLOYMENT_CONFIG}:/config/deployment.conf
+ - ${TALER_DEPLOYMENT_CONFIG:?Please export TALER_DEPLOYMENT_CONFIG}:/config/deployment.conf
bank:
build: ./images/libeufin
@@ -32,4 +35,5 @@ services:
- 15000:15000 # Sandbox
- 15001:15001 # Nexus
volumes:
- - ${TALER_DEPLOYMENT_CONFIG}:/config/deployment.conf
+ - ${TALER_DEPLOYMENT_CONFIG:?Please export TALER_DEPLOYMENT_CONFIG}:/config/deployment.conf
+ - ${TALER_DEPLOYMENT_DATA:-~/taler-data}/libeufin:/data
diff --git a/docker/hybrid/images/libeufin/startup.sh b/docker/hybrid/images/libeufin/startup.sh
@@ -41,8 +41,7 @@ is_serving() {
}
EXCHANGE_IBAN=DE159593
-
-export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:/sandbox.sqlite3"
+export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:/data/sandbox.sqlite3"
export LIBEUFIN_SANDBOX_ADMIN_PASSWORD=secret
echo -n "Creating ${CURRENCY} default demobank..."
libeufin-sandbox config --currency ${CURRENCY} default
@@ -78,7 +77,7 @@ echo DONE
## NEXUS SETUP
EXCHANGE_NEXUS_USERNAME=exchange-at-nexus
EXCHANGE_NEXUS_PASSWORD=x
-export LIBEUFIN_NEXUS_DB_CONNECTION="jdbc:sqlite:/nexus.sqlite3"
+export LIBEUFIN_NEXUS_DB_CONNECTION="jdbc:sqlite:/data/nexus.sqlite3"
echo -n "Creating Nexus superuser..."
libeufin-nexus superuser $EXCHANGE_NEXUS_USERNAME --password $EXCHANGE_NEXUS_PASSWORD
echo DONE
diff --git a/docker/hybrid/images/merchant/taler.conf b/docker/hybrid/images/merchant/taler.conf
@@ -2,7 +2,7 @@
currency = __CURRENCY__
[paths]
-TALER_DATA_HOME = /data
+taler_data_home = /data
[merchant-exchange-__CURRENCY__]
currency = __CURRENCY__