diff --git a/9.0/docker-entrypoint.sh b/9.0/docker-entrypoint.sh index 4bfeb7611b..95ec772380 100755 --- a/9.0/docker-entrypoint.sh +++ b/9.0/docker-entrypoint.sh @@ -77,7 +77,11 @@ if [ "$1" = 'postgres' ]; then for f in /docker-entrypoint-initdb.d/*; do case "$f" in *.sh) echo "$0: running $f"; . "$f" ;; - *.sql) echo "$0: running $f"; psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < "$f" && echo ;; + *.sql) + echo "$0: running $f"; + psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < "$f" + echo + ;; *) echo "$0: ignoring $f" ;; esac echo diff --git a/9.1/docker-entrypoint.sh b/9.1/docker-entrypoint.sh index 4bfeb7611b..95ec772380 100755 --- a/9.1/docker-entrypoint.sh +++ b/9.1/docker-entrypoint.sh @@ -77,7 +77,11 @@ if [ "$1" = 'postgres' ]; then for f in /docker-entrypoint-initdb.d/*; do case "$f" in *.sh) echo "$0: running $f"; . "$f" ;; - *.sql) echo "$0: running $f"; psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < "$f" && echo ;; + *.sql) + echo "$0: running $f"; + psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < "$f" + echo + ;; *) echo "$0: ignoring $f" ;; esac echo diff --git a/9.2/docker-entrypoint.sh b/9.2/docker-entrypoint.sh index 4bfeb7611b..95ec772380 100755 --- a/9.2/docker-entrypoint.sh +++ b/9.2/docker-entrypoint.sh @@ -77,7 +77,11 @@ if [ "$1" = 'postgres' ]; then for f in /docker-entrypoint-initdb.d/*; do case "$f" in *.sh) echo "$0: running $f"; . "$f" ;; - *.sql) echo "$0: running $f"; psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < "$f" && echo ;; + *.sql) + echo "$0: running $f"; + psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < "$f" + echo + ;; *) echo "$0: ignoring $f" ;; esac echo diff --git a/9.3/docker-entrypoint.sh b/9.3/docker-entrypoint.sh index 4bfeb7611b..95ec772380 100755 --- a/9.3/docker-entrypoint.sh +++ b/9.3/docker-entrypoint.sh @@ -77,7 +77,11 @@ if [ "$1" = 'postgres' ]; then for f in /docker-entrypoint-initdb.d/*; do case "$f" in *.sh) echo "$0: running $f"; . "$f" ;; - *.sql) echo "$0: running $f"; psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < "$f" && echo ;; + *.sql) + echo "$0: running $f"; + psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < "$f" + echo + ;; *) echo "$0: ignoring $f" ;; esac echo diff --git a/9.4/docker-entrypoint.sh b/9.4/docker-entrypoint.sh index 4bfeb7611b..95ec772380 100755 --- a/9.4/docker-entrypoint.sh +++ b/9.4/docker-entrypoint.sh @@ -77,7 +77,11 @@ if [ "$1" = 'postgres' ]; then for f in /docker-entrypoint-initdb.d/*; do case "$f" in *.sh) echo "$0: running $f"; . "$f" ;; - *.sql) echo "$0: running $f"; psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < "$f" && echo ;; + *.sql) + echo "$0: running $f"; + psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < "$f" + echo + ;; *) echo "$0: ignoring $f" ;; esac echo diff --git a/9.5/docker-entrypoint.sh b/9.5/docker-entrypoint.sh index 4bfeb7611b..95ec772380 100755 --- a/9.5/docker-entrypoint.sh +++ b/9.5/docker-entrypoint.sh @@ -77,7 +77,11 @@ if [ "$1" = 'postgres' ]; then for f in /docker-entrypoint-initdb.d/*; do case "$f" in *.sh) echo "$0: running $f"; . "$f" ;; - *.sql) echo "$0: running $f"; psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < "$f" && echo ;; + *.sql) + echo "$0: running $f"; + psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < "$f" + echo + ;; *) echo "$0: ignoring $f" ;; esac echo diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 4bfeb7611b..95ec772380 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -77,7 +77,11 @@ if [ "$1" = 'postgres' ]; then for f in /docker-entrypoint-initdb.d/*; do case "$f" in *.sh) echo "$0: running $f"; . "$f" ;; - *.sql) echo "$0: running $f"; psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < "$f" && echo ;; + *.sql) + echo "$0: running $f"; + psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" < "$f" + echo + ;; *) echo "$0: ignoring $f" ;; esac echo