Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 766be90

Browse files
committed
Regenerate scripts/doc
1 parent f54d715 commit 766be90

File tree

22 files changed

+116
-12
lines changed

22 files changed

+116
-12
lines changed

‎10/Dockerfile.rhel8‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ FROM ubi8/s2i-core
99
# * $POSTGRESQL_DATABASE - Name of the database to create
1010
# * $POSTGRESQL_ADMIN_PASSWORD (Optional) - Password for the 'postgres'
1111
# PostgreSQL administrative account
12+
# * $POSTGRESQL_ENCODING - Database encoding. Default to UTF8
13+
# * $POSTGRESQL_LOCALE - Database locale. Default to en_US
1214

1315
ENV POSTGRESQL_VERSION=10 \
1416
POSTGRESQL_PREV_VERSION=9.6 \

‎10/root/usr/share/container-scripts/postgresql/common.sh‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,10 @@ initdb_wrapper ()
201201
# Initialize the database cluster with utf8 support enabled by default.
202202
# This might affect performance, see:
203203
# http://www.postgresql.org/docs/10/static/locale.html
204-
LANG=${LANG:-en_US.utf8} "$@"
204+
ENCODING=${POSTGRESQL_ENCODING:-UTF8}
205+
LOCALE=${POSTGRESQL_LOCALE:-en_US}
206+
if [ ${LOCALE} == "C" ] ; then LANG=C; fi
207+
LANG=${LANG:-$LOCALE.$ENCODING} "$@" -E $ENCODING
205208
}
206209

207210
function initialize_database() {
@@ -234,7 +237,16 @@ EOF
234237
function create_users() {
235238
if [[ ",$postinitdb_actions," = *,simple_db,* ]]; then
236239
createuser "$POSTGRESQL_USER"
237-
createdb --owner="$POSTGRESQL_USER" "$POSTGRESQL_DATABASE"
240+
241+
EXTRA_ARGS=""
242+
if [ -v POSTGRESQL_ENCODING ]; then
243+
EXTRA_ARGS="$EXTRA_ARGS -E $POSTGRESQL_ENCODING"
244+
fi
245+
if [ -v POSTGRESQL_LOCALE ]; then
246+
EXTRA_ARGS="$EXTRA_ARGS -l $POSTGRESQL_LOCALE"
247+
fi
248+
249+
createdb $EXTRA_ARGS --owner="$POSTGRESQL_USER" "$POSTGRESQL_DATABASE"
238250
fi
239251

240252
if [ -v POSTGRESQL_MASTER_USER ]; then

‎12/Dockerfile.fedora‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ FROM quay.io/fedora/s2i-core:38
99
# * $POSTGRESQL_DATABASE - Name of the database to create
1010
# * $POSTGRESQL_ADMIN_PASSWORD (Optional) - Password for the 'postgres'
1111
# PostgreSQL administrative account
12+
# * $POSTGRESQL_ENCODING - Database encoding. Default to UTF8
13+
# * $POSTGRESQL_LOCALE - Database locale. Default to en_US
1214

1315
ENV NAME=postgresql \
1416
VERSION=0 \

‎12/Dockerfile.rhel8‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ FROM ubi8/s2i-core
99
# * $POSTGRESQL_DATABASE - Name of the database to create
1010
# * $POSTGRESQL_ADMIN_PASSWORD (Optional) - Password for the 'postgres'
1111
# PostgreSQL administrative account
12+
# * $POSTGRESQL_ENCODING - Database encoding. Default to UTF8
13+
# * $POSTGRESQL_LOCALE - Database locale. Default to en_US
1214

1315
ENV POSTGRESQL_VERSION=12 \
1416
POSTGRESQL_PREV_VERSION=10 \

‎12/root/usr/share/container-scripts/postgresql/common.sh‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,10 @@ initdb_wrapper ()
201201
# Initialize the database cluster with utf8 support enabled by default.
202202
# This might affect performance, see:
203203
# http://www.postgresql.org/docs/12/static/locale.html
204-
LANG=${LANG:-en_US.utf8} "$@"
204+
ENCODING=${POSTGRESQL_ENCODING:-UTF8}
205+
LOCALE=${POSTGRESQL_LOCALE:-en_US}
206+
if [ ${LOCALE} == "C" ] ; then LANG=C; fi
207+
LANG=${LANG:-$LOCALE.$ENCODING} "$@" -E $ENCODING
205208
}
206209

207210
function initialize_database() {
@@ -234,7 +237,16 @@ EOF
234237
function create_users() {
235238
if [[ ",$postinitdb_actions," = *,simple_db,* ]]; then
236239
createuser "$POSTGRESQL_USER"
237-
createdb --owner="$POSTGRESQL_USER" "$POSTGRESQL_DATABASE"
240+
241+
EXTRA_ARGS=""
242+
if [ -v POSTGRESQL_ENCODING ]; then
243+
EXTRA_ARGS="$EXTRA_ARGS -E $POSTGRESQL_ENCODING"
244+
fi
245+
if [ -v POSTGRESQL_LOCALE ]; then
246+
EXTRA_ARGS="$EXTRA_ARGS -l $POSTGRESQL_LOCALE"
247+
fi
248+
249+
createdb $EXTRA_ARGS --owner="$POSTGRESQL_USER" "$POSTGRESQL_DATABASE"
238250
fi
239251

240252
if [ -v POSTGRESQL_MASTER_USER ]; then

‎13/Dockerfile.c9s‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ FROM quay.io/sclorg/s2i-core-c9s:c9s
99
# * $POSTGRESQL_DATABASE - Name of the database to create
1010
# * $POSTGRESQL_ADMIN_PASSWORD (Optional) - Password for the 'postgres'
1111
# PostgreSQL administrative account
12+
# * $POSTGRESQL_ENCODING - Database encoding. Default to UTF8
13+
# * $POSTGRESQL_LOCALE - Database locale. Default to en_US
1214

1315
ENV POSTGRESQL_VERSION=13 \
1416
POSTGRESQL_PREV_VERSION=12 \

‎13/Dockerfile.fedora‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ FROM quay.io/fedora/s2i-core:38
99
# * $POSTGRESQL_DATABASE - Name of the database to create
1010
# * $POSTGRESQL_ADMIN_PASSWORD (Optional) - Password for the 'postgres'
1111
# PostgreSQL administrative account
12+
# * $POSTGRESQL_ENCODING - Database encoding. Default to UTF8
13+
# * $POSTGRESQL_LOCALE - Database locale. Default to en_US
1214

1315
ENV NAME=postgresql \
1416
VERSION=0 \

‎13/Dockerfile.rhel8‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ FROM ubi8/s2i-core
99
# * $POSTGRESQL_DATABASE - Name of the database to create
1010
# * $POSTGRESQL_ADMIN_PASSWORD (Optional) - Password for the 'postgres'
1111
# PostgreSQL administrative account
12+
# * $POSTGRESQL_ENCODING - Database encoding. Default to UTF8
13+
# * $POSTGRESQL_LOCALE - Database locale. Default to en_US
1214

1315
ENV POSTGRESQL_VERSION=13 \
1416
POSTGRESQL_PREV_VERSION=12 \

‎13/Dockerfile.rhel9‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ FROM ubi9/s2i-core
99
# * $POSTGRESQL_DATABASE - Name of the database to create
1010
# * $POSTGRESQL_ADMIN_PASSWORD (Optional) - Password for the 'postgres'
1111
# PostgreSQL administrative account
12+
# * $POSTGRESQL_ENCODING - Database encoding. Default to UTF8
13+
# * $POSTGRESQL_LOCALE - Database locale. Default to en_US
1214

1315
ENV POSTGRESQL_VERSION=13 \
1416
POSTGRESQL_PREV_VERSION=12 \

‎13/root/usr/share/container-scripts/postgresql/common.sh‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,10 @@ initdb_wrapper ()
201201
# Initialize the database cluster with utf8 support enabled by default.
202202
# This might affect performance, see:
203203
# http://www.postgresql.org/docs/13/static/locale.html
204-
LANG=${LANG:-en_US.utf8} "$@"
204+
ENCODING=${POSTGRESQL_ENCODING:-UTF8}
205+
LOCALE=${POSTGRESQL_LOCALE:-en_US}
206+
if [ ${LOCALE} == "C" ] ; then LANG=C; fi
207+
LANG=${LANG:-$LOCALE.$ENCODING} "$@" -E $ENCODING
205208
}
206209

207210
function initialize_database() {
@@ -234,7 +237,16 @@ EOF
234237
function create_users() {
235238
if [[ ",$postinitdb_actions," = *,simple_db,* ]]; then
236239
createuser "$POSTGRESQL_USER"
237-
createdb --owner="$POSTGRESQL_USER" "$POSTGRESQL_DATABASE"
240+
241+
EXTRA_ARGS=""
242+
if [ -v POSTGRESQL_ENCODING ]; then
243+
EXTRA_ARGS="$EXTRA_ARGS -E $POSTGRESQL_ENCODING"
244+
fi
245+
if [ -v POSTGRESQL_LOCALE ]; then
246+
EXTRA_ARGS="$EXTRA_ARGS -l $POSTGRESQL_LOCALE"
247+
fi
248+
249+
createdb $EXTRA_ARGS --owner="$POSTGRESQL_USER" "$POSTGRESQL_DATABASE"
238250
fi
239251

240252
if [ -v POSTGRESQL_MASTER_USER ]; then

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /