You've already forked postgres
mirror of
https://github.com/docker-library/postgres.git
synced 2025-11-17 13:02:40 +03:00
Merge pull request #118 from orzeh/master
Stops docker-entrypoint.sh on psql error
This commit is contained in:
@@ -77,7 +77,11 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
for f in /docker-entrypoint-initdb.d/*; do
|
for f in /docker-entrypoint-initdb.d/*; do
|
||||||
case "$f" in
|
case "$f" in
|
||||||
*.sh) echo "$0: running $f"; . "$f" ;;
|
*.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" ;;
|
*) echo "$0: ignoring $f" ;;
|
||||||
esac
|
esac
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -77,7 +77,11 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
for f in /docker-entrypoint-initdb.d/*; do
|
for f in /docker-entrypoint-initdb.d/*; do
|
||||||
case "$f" in
|
case "$f" in
|
||||||
*.sh) echo "$0: running $f"; . "$f" ;;
|
*.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" ;;
|
*) echo "$0: ignoring $f" ;;
|
||||||
esac
|
esac
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -77,7 +77,11 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
for f in /docker-entrypoint-initdb.d/*; do
|
for f in /docker-entrypoint-initdb.d/*; do
|
||||||
case "$f" in
|
case "$f" in
|
||||||
*.sh) echo "$0: running $f"; . "$f" ;;
|
*.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" ;;
|
*) echo "$0: ignoring $f" ;;
|
||||||
esac
|
esac
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -77,7 +77,11 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
for f in /docker-entrypoint-initdb.d/*; do
|
for f in /docker-entrypoint-initdb.d/*; do
|
||||||
case "$f" in
|
case "$f" in
|
||||||
*.sh) echo "$0: running $f"; . "$f" ;;
|
*.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" ;;
|
*) echo "$0: ignoring $f" ;;
|
||||||
esac
|
esac
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -77,7 +77,11 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
for f in /docker-entrypoint-initdb.d/*; do
|
for f in /docker-entrypoint-initdb.d/*; do
|
||||||
case "$f" in
|
case "$f" in
|
||||||
*.sh) echo "$0: running $f"; . "$f" ;;
|
*.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" ;;
|
*) echo "$0: ignoring $f" ;;
|
||||||
esac
|
esac
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -77,7 +77,11 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
for f in /docker-entrypoint-initdb.d/*; do
|
for f in /docker-entrypoint-initdb.d/*; do
|
||||||
case "$f" in
|
case "$f" in
|
||||||
*.sh) echo "$0: running $f"; . "$f" ;;
|
*.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" ;;
|
*) echo "$0: ignoring $f" ;;
|
||||||
esac
|
esac
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -77,7 +77,11 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
for f in /docker-entrypoint-initdb.d/*; do
|
for f in /docker-entrypoint-initdb.d/*; do
|
||||||
case "$f" in
|
case "$f" in
|
||||||
*.sh) echo "$0: running $f"; . "$f" ;;
|
*.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" ;;
|
*) echo "$0: ignoring $f" ;;
|
||||||
esac
|
esac
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user