gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-deployment] branch master updated: Switch to named volumes.


From: gnunet
Subject: [taler-deployment] branch master updated: Switch to named volumes.
Date: Thu, 20 Oct 2022 23:39:35 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository deployment.

The following commit(s) were added to refs/heads/master by this push:
     new 6c0c47e  Switch to named volumes.
6c0c47e is described below

commit 6c0c47eec71b5f572c81f39233fd9d22bdfd0bfb
Author: MS <ms@taler.net>
AuthorDate: Thu Oct 20 23:37:09 2022 +0200

    Switch to named volumes.
---
 docker/hybrid/README                     | 12 +-----------
 docker/hybrid/docker-compose.yml         | 29 +++++++++++++++++++++--------
 docker/hybrid/images/postgres/Dockerfile |  5 +++++
 3 files changed, 27 insertions(+), 19 deletions(-)

diff --git a/docker/hybrid/README b/docker/hybrid/README
index 52adb18..9071e65 100644
--- a/docker/hybrid/README
+++ b/docker/hybrid/README
@@ -50,17 +50,7 @@ for an example.
 Volumes
 -------
 
-The environment variable TALER_DEPLOYMENT_DATA controls
-where on the host's filesystem the services store data.
-It defaults to ~/taler-data, and contains exchange, libeufin,
-and postgresql data.
-
-The environment variable TALER_DEPLOYMENT_LOGS controls
-where on the host's filesystem the services store log files.
-It defaults to ~/taler-logs and will be created by Docker -
-owned by "root:root" - if it's not found.  NOTE: the 'postgres'
-user (uid=999) needs write access to TALER_DEPLOYMENT_LOGS,
-in order to log from the database container.
+TBD: write how to export data.
 
 Run
 ---
diff --git a/docker/hybrid/docker-compose.yml b/docker/hybrid/docker-compose.yml
index b29cab8..f048ce4 100644
--- a/docker/hybrid/docker-compose.yml
+++ b/docker/hybrid/docker-compose.yml
@@ -1,18 +1,31 @@
 version: '3' # it's a constant
 
+volumes:
+  talerdata:
+  talerlogs:
+
 services:
   talerdb:
     build: ./images/postgres
     ports:
       - 8888:5432
     volumes:
-      - ${TALER_DEPLOYMENT_LOGS:-~/taler-logs}:/logs
-      - 
${TALER_DEPLOYMENT_DATA:-~/taler-data}/postgresql:/var/lib/postgresql/data
+      - talerlogs:/logs
+      - 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
+      # matches the role used by other containers when
+      # they connect here.
       POSTGRES_USER: root
-      POSTGRES_PASSWORD: nonce # changed during init.
+      # this changes to the password used by other
+      # containers to connect here.  This definition
+      # only makes the init logic happy.
+      POSTGRES_PASSWORD: nonce
       POSTGRES_HOST_AUTH_METHOD: scram-sha-256
+      # the final "/postgresql" is used to create
+      # a "postgresql" subfolder in the data volume.
+      PGDATA: /var/lib/postgresql/data/postgresql
 
   exchange:
     build: ./images/exchange
@@ -21,8 +34,8 @@ services:
     ports:
       - 5555:80
     volumes:
-      - ${TALER_DEPLOYMENT_LOGS:-~/taler-logs}:/logs
-      - ${TALER_DEPLOYMENT_DATA:-~/taler-data}/exchange:/data
+      - talerlogs:/logs
+      - talerdata:/data
       - ${TALER_DEPLOYMENT_CONFIG:?Please export 
TALER_DEPLOYMENT_CONFIG}:/config/deployment.conf
 
   merchant:
@@ -33,7 +46,7 @@ services:
       - 5556:80
       - 5559:8080 # Blog TBD.
     volumes:
-      - ${TALER_DEPLOYMENT_LOGS:-~/taler-logs}:/logs
+      - talerlogs:/logs
       - ${TALER_DEPLOYMENT_CONFIG:?Please export 
TALER_DEPLOYMENT_CONFIG}:/config/deployment.conf
 
   bank:
@@ -42,6 +55,6 @@ services:
       - 15000:15000 # Sandbox
       - 15001:15001 # Nexus
     volumes:
+      - talerlogs:/logs
+      - talerdata:/data
       - ${TALER_DEPLOYMENT_CONFIG:?Please export 
TALER_DEPLOYMENT_CONFIG}:/config/deployment.conf
-      - ${TALER_DEPLOYMENT_DATA:-~/taler-data}/libeufin:/data
-      - ${TALER_DEPLOYMENT_LOGS:-~/taler-logs}:/logs
diff --git a/docker/hybrid/images/postgres/Dockerfile 
b/docker/hybrid/images/postgres/Dockerfile
index 9b99dc1..e6588e8 100644
--- a/docker/hybrid/images/postgres/Dockerfile
+++ b/docker/hybrid/images/postgres/Dockerfile
@@ -1,4 +1,9 @@
 FROM docker.io/postgres
 
+# Default "${PGDATA}/log" directory was problematic
+# when mounted in a volume.
+RUN mkdir /logs
+RUN chown postgres:postgres /logs
+
 COPY init.sh /docker-entrypoint-initdb.d/init.sh
 RUN chmod +x /docker-entrypoint-initdb.d/init.sh

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]