File tree Expand file tree Collapse file tree 14 files changed +63
-42
lines changed
Expand file tree Collapse file tree 14 files changed +63
-42
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
4242ENV PGDATA /var/lib/postgresql/data
4343VOLUME /var/lib/postgresql/data
4444
45- COPY ./ docker-entrypoint.sh /
45+ COPY docker-entrypoint.sh /
4646
4747ENTRYPOINT ["/docker-entrypoint.sh" ]
4848
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then
1515 pass=" PASSWORD '$POSTGRES_PASSWORD '"
1616 authMethod=md5
1717 else
18- # The - option suppresses leading tabs but *not* spaces. :)
18+ # The - option suppresses leading tabs but *not* spaces. :)
1919 cat >&2 << -'EOWARN '
2020 ****************************************************
2121 WARNING: No password has been set for the database.
@@ -33,14 +33,17 @@ if [ "$1" = 'postgres' ]; then
3333 op=' ALTER'
3434 else
3535 op=' CREATE'
36- gosu postgres postgres --single -E << -EOSQL
37- CREATE DATABASE "$POSTGRES_USER "
36+ gosu postgres postgres --single -jE << -EOSQL
37+ CREATE DATABASE "$POSTGRES_USER " ;
3838 EOSQL
39+ echo
3940 fi
4041
41- gosu postgres postgres --single << -EOSQL
42- $op USER "$POSTGRES_USER " WITH SUPERUSER $pass
42+ gosu postgres postgres --single -jE << -EOSQL
43+ $op USER "$POSTGRES_USER " WITH SUPERUSER $pass ;
4344 EOSQL
45+ echo
46+
4447 { echo ; echo " host all \" $POSTGRES_USER \" 0.0.0.0/0 $authMethod " ; } >> " $PGDATA " /pg_hba.conf
4548
4649 if [ -d /docker-entrypoint-initdb.d ]; then
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
4242ENV PGDATA /var/lib/postgresql/data
4343VOLUME /var/lib/postgresql/data
4444
45- COPY ./ docker-entrypoint.sh /
45+ COPY docker-entrypoint.sh /
4646
4747ENTRYPOINT ["/docker-entrypoint.sh" ]
4848
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then
1515 pass=" PASSWORD '$POSTGRES_PASSWORD '"
1616 authMethod=md5
1717 else
18- # The - option suppresses leading tabs but *not* spaces. :)
18+ # The - option suppresses leading tabs but *not* spaces. :)
1919 cat >&2 << -'EOWARN '
2020 ****************************************************
2121 WARNING: No password has been set for the database.
@@ -33,14 +33,17 @@ if [ "$1" = 'postgres' ]; then
3333 op=' ALTER'
3434 else
3535 op=' CREATE'
36- gosu postgres postgres --single -E << -EOSQL
37- CREATE DATABASE "$POSTGRES_USER "
36+ gosu postgres postgres --single -jE << -EOSQL
37+ CREATE DATABASE "$POSTGRES_USER " ;
3838 EOSQL
39+ echo
3940 fi
4041
41- gosu postgres postgres --single << -EOSQL
42- $op USER "$POSTGRES_USER " WITH SUPERUSER $pass
42+ gosu postgres postgres --single -jE << -EOSQL
43+ $op USER "$POSTGRES_USER " WITH SUPERUSER $pass ;
4344 EOSQL
45+ echo
46+
4447 { echo ; echo " host all \" $POSTGRES_USER \" 0.0.0.0/0 $authMethod " ; } >> " $PGDATA " /pg_hba.conf
4548
4649 if [ -d /docker-entrypoint-initdb.d ]; then
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
4242ENV PGDATA /var/lib/postgresql/data
4343VOLUME /var/lib/postgresql/data
4444
45- COPY ./ docker-entrypoint.sh /
45+ COPY docker-entrypoint.sh /
4646
4747ENTRYPOINT ["/docker-entrypoint.sh" ]
4848
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then
1515 pass=" PASSWORD '$POSTGRES_PASSWORD '"
1616 authMethod=md5
1717 else
18- # The - option suppresses leading tabs but *not* spaces. :)
18+ # The - option suppresses leading tabs but *not* spaces. :)
1919 cat >&2 << -'EOWARN '
2020 ****************************************************
2121 WARNING: No password has been set for the database.
@@ -33,14 +33,17 @@ if [ "$1" = 'postgres' ]; then
3333 op=' ALTER'
3434 else
3535 op=' CREATE'
36- gosu postgres postgres --single -E << -EOSQL
37- CREATE DATABASE "$POSTGRES_USER "
36+ gosu postgres postgres --single -jE << -EOSQL
37+ CREATE DATABASE "$POSTGRES_USER " ;
3838 EOSQL
39+ echo
3940 fi
4041
41- gosu postgres postgres --single << -EOSQL
42- $op USER "$POSTGRES_USER " WITH SUPERUSER $pass
42+ gosu postgres postgres --single -jE << -EOSQL
43+ $op USER "$POSTGRES_USER " WITH SUPERUSER $pass ;
4344 EOSQL
45+ echo
46+
4447 { echo ; echo " host all \" $POSTGRES_USER \" 0.0.0.0/0 $authMethod " ; } >> " $PGDATA " /pg_hba.conf
4548
4649 if [ -d /docker-entrypoint-initdb.d ]; then
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
4242ENV PGDATA /var/lib/postgresql/data
4343VOLUME /var/lib/postgresql/data
4444
45- COPY ./ docker-entrypoint.sh /
45+ COPY docker-entrypoint.sh /
4646
4747ENTRYPOINT ["/docker-entrypoint.sh" ]
4848
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then
1515 pass=" PASSWORD '$POSTGRES_PASSWORD '"
1616 authMethod=md5
1717 else
18- # The - option suppresses leading tabs but *not* spaces. :)
18+ # The - option suppresses leading tabs but *not* spaces. :)
1919 cat >&2 << -'EOWARN '
2020 ****************************************************
2121 WARNING: No password has been set for the database.
@@ -33,14 +33,17 @@ if [ "$1" = 'postgres' ]; then
3333 op=' ALTER'
3434 else
3535 op=' CREATE'
36- gosu postgres postgres --single -E << -EOSQL
37- CREATE DATABASE "$POSTGRES_USER "
36+ gosu postgres postgres --single -jE << -EOSQL
37+ CREATE DATABASE "$POSTGRES_USER " ;
3838 EOSQL
39+ echo
3940 fi
4041
41- gosu postgres postgres --single << -EOSQL
42- $op USER "$POSTGRES_USER " WITH SUPERUSER $pass
42+ gosu postgres postgres --single -jE << -EOSQL
43+ $op USER "$POSTGRES_USER " WITH SUPERUSER $pass ;
4344 EOSQL
45+ echo
46+
4447 { echo ; echo " host all \" $POSTGRES_USER \" 0.0.0.0/0 $authMethod " ; } >> " $PGDATA " /pg_hba.conf
4548
4649 if [ -d /docker-entrypoint-initdb.d ]; then
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
4242ENV PGDATA /var/lib/postgresql/data
4343VOLUME /var/lib/postgresql/data
4444
45- COPY ./ docker-entrypoint.sh /
45+ COPY docker-entrypoint.sh /
4646
4747ENTRYPOINT ["/docker-entrypoint.sh" ]
4848
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then
1515 pass=" PASSWORD '$POSTGRES_PASSWORD '"
1616 authMethod=md5
1717 else
18- # The - option suppresses leading tabs but *not* spaces. :)
18+ # The - option suppresses leading tabs but *not* spaces. :)
1919 cat >&2 << -'EOWARN '
2020 ****************************************************
2121 WARNING: No password has been set for the database.
@@ -33,14 +33,17 @@ if [ "$1" = 'postgres' ]; then
3333 op=' ALTER'
3434 else
3535 op=' CREATE'
36- gosu postgres postgres --single -E << -EOSQL
37- CREATE DATABASE "$POSTGRES_USER "
36+ gosu postgres postgres --single -jE << -EOSQL
37+ CREATE DATABASE "$POSTGRES_USER " ;
3838 EOSQL
39+ echo
3940 fi
4041
41- gosu postgres postgres --single << -EOSQL
42- $op USER "$POSTGRES_USER " WITH SUPERUSER $pass
42+ gosu postgres postgres --single -jE << -EOSQL
43+ $op USER "$POSTGRES_USER " WITH SUPERUSER $pass ;
4344 EOSQL
45+ echo
46+
4447 { echo ; echo " host all \" $POSTGRES_USER \" 0.0.0.0/0 $authMethod " ; } >> " $PGDATA " /pg_hba.conf
4548
4649 if [ -d /docker-entrypoint-initdb.d ]; then
You can’t perform that action at this time.
0 commit comments