From 50c94768419a64c2e46704ae0bcc2982bb3132e9 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 25 Feb 2020 17:01:56 +0100 Subject: [PATCH] [db] fix host for restoring --- dev/local/restore_db.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/local/restore_db.sh b/dev/local/restore_db.sh index 4104d6b..5392fd3 100755 --- a/dev/local/restore_db.sh +++ b/dev/local/restore_db.sh @@ -1,6 +1,6 @@ #!/bin/bash -/srv/bin/misc/wait-for-it/wait-for-it.sh -h localhost -p $DB_PORT; +/srv/bin/misc/wait-for-it/wait-for-it.sh -h db -p $DB_PORT; set -e @@ -8,7 +8,7 @@ echo "Restoring..." # import database functions of type if [ ! -z "$MYSQL_ROOT_PASSWORD" ]; then - gunzip < /srv/backup/mariadb.dump.gz | mysql -h localhost $MYSQL_DATABASE -uroot -p$MYSQL_ROOT_PASSWORD + gunzip < /srv/backup/mariadb.dump.gz | mysql -h db $MYSQL_DATABASE -uroot -p$MYSQL_ROOT_PASSWORD elif [ ! -z "$POSTGRES_PASSWORD" ]; then export PGPASSWORD=$POSTGRES_PASSWORD pg_restore -c -C -hdb -Upostgres -dpostgres /srv/backup/postgres.dump -- 2.39.5