gnunet-svn
[Top][All Lists]
Advanced

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

[taler-deployment] branch master updated: DB wait loop


From: gnunet
Subject: [taler-deployment] branch master updated: DB wait loop
Date: Tue, 27 Sep 2022 20:41:55 +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 1b893b6  DB wait loop
1b893b6 is described below

commit 1b893b691f6dfcea09affc0b2c7a2dbcdea69bbc
Author: MS <ms@taler.net>
AuthorDate: Tue Sep 27 20:41:49 2022 +0200

    DB wait loop
---
 docker/hybrid/images/exchange/startup.sh | 12 +++++++++++-
 docker/hybrid/images/postgres/init.sql   |  2 +-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/docker/hybrid/images/exchange/startup.sh 
b/docker/hybrid/images/exchange/startup.sh
index 1161549..6d26550 100644
--- a/docker/hybrid/images/exchange/startup.sh
+++ b/docker/hybrid/images/exchange/startup.sh
@@ -1,10 +1,20 @@
 #!/bin/bash
 
+set -eu
 export LD_LIBRARY_PATH=/usr/local/lib
 
 sed -i 's/\${EXCHANGE_URL}/http:\/\/exchange.example.com\//' /config/taler.conf
 
-taler-exchange-dbinit -c /config/taler.conf --reset # &> /dev/null
+while ! pg_isready -h talerdb -d taler; do
+  echo DB not ready yet.
+  sleep 2
+done
+echo Now DB is ready.
+
+# Make sure we have the right to connect
+echo "" | psql -h talerdb -d taler
+
+taler-exchange-dbinit -L DEBUG -c /config/taler.conf # --reset # &> /dev/null
 
 #taler-exchange-secmod-eddsa -c /config/taler.conf &
 #taler-exchange-secmod-rsa -c /config/taler.conf &
diff --git a/docker/hybrid/images/postgres/init.sql 
b/docker/hybrid/images/postgres/init.sql
index 81ab8b4..dec35df 100644
--- a/docker/hybrid/images/postgres/init.sql
+++ b/docker/hybrid/images/postgres/init.sql
@@ -1,2 +1,2 @@
-CREATE ROLE root SUPERUSER;
+CREATE ROLE root SUPERUSER LOGIN;
 CREATE DATABASE taler WITH OWNER root;

-- 
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]