From ddecc8474d2f130dff5b359a607883fad6d588ec Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Wed, 14 Feb 2018 09:55:00 +0100 Subject: [PATCH] Create, if needed the pgdata folder --- load_data.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/load_data.sh b/load_data.sh index a6bcf99..b8e579f 100755 --- a/load_data.sh +++ b/load_data.sh @@ -29,6 +29,12 @@ fi # 1. Create all the DB at once echo "Create databases..." +if [ ! -d ${DB_DATA} ] +then + mkdir -p ${DB_DATA} + sudo chown -R 999:999 ${DB_DATA} +fi + db_id=$(docker run --rm -d \ -e POSTGRES_USER="${DB_USER_ADMIN}" \ -e POSTGRES_PASSWORD="${DB_PASSWORD_ADMIN}" \