summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docker/hybrid/images/exchange/startup.sh12
-rw-r--r--docker/hybrid/images/postgres/init.sql2
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;