File tree 17 files changed +66
-63
lines changed
share/container-scripts/postgresql
share/container-scripts/postgresql
share/container-scripts/postgresql
17 files changed +66
-63
lines changed Original file line number Diff line number Diff line change 24
24
25
25
pg_ctl -w start -o " -h ''"
26
26
if $PG_INITIALIZED ; then
27
- process_extending_files ${APP_DATA} /src/postgresql-init ${CONTAINER_SCRIPTS_PATH} /postgresql- init
27
+ process_extending_files ${APP_DATA} /src/postgresql-init ${CONTAINER_SCRIPTS_PATH} /init
28
28
migrate_db
29
29
create_users
30
30
fi
31
31
32
- process_extending_files ${APP_DATA} /src/postgresql-start-hook ${CONTAINER_SCRIPTS_PATH} /postgresql- start-hook
32
+ process_extending_files ${APP_DATA} /src/postgresql-start ${CONTAINER_SCRIPTS_PATH} /start
33
33
34
34
pg_ctl stop
35
35
Original file line number Diff line number Diff line change @@ -252,18 +252,26 @@ $ s2i build ~/image-configuration/ postgresql new-postgresql
252
252
The directory passed to ` s2i build ` should contain one or more of the
253
253
following directories:
254
254
255
- ##### ` postgresql-config / `
255
+ ##### ` postgresql-cfg / `
256
256
257
- contained configuration files (` *.conf ` ) will be included at the end of image postgresql.conf file during database initialization
257
+ Contained configuration files (` *.conf ` ) will be included at the end of image
258
+ postgresql.conf file.
258
259
259
260
260
261
##### ` postgresql-init/ `
261
262
262
- contained shell scripts (` *.sh ` ) are sourced once, when database is initialized
263
+ Contained shell scripts (` *.sh ` ) are sourced when the database is freshly
264
+ initialized (after successful initdb run which made the data directory
265
+ non-empty). At the time of sourcing these scripts, the local PostgreSQL
266
+ server is running. For re-deployments scenarios with persistent data
267
+ directory, the scripts are not sourced (no-op).
263
268
264
- ##### ` postgresql-start-hook/ `
265
269
266
- contained shell scripts (` *.sh ` ) are sourced before every start
270
+ ##### ` postgresql-start/ `
271
+
272
+ Same sematics as ` postgresql-init/ ` , except that these scripts are
273
+ always sourced (after ` postgresql-init/ ` scripts, if they exist).
274
+
267
275
268
276
----------------------------------------------
269
277
Original file line number Diff line number Diff line change @@ -125,6 +125,13 @@ function generate_postgresql_config() {
125
125
< " ${CONTAINER_SCRIPTS_PATH} /openshift-custom-postgresql-replication.conf.template" \
126
126
>> " ${POSTGRESQL_CONFIG_FILE} "
127
127
fi
128
+
129
+ (
130
+ shopt -s nullglob
131
+ for conf in " ${APP_DATA} " /src/postgresql-cfg/* .conf; do
132
+ echo include \' ${conf} \' >> " ${POSTGRESQL_CONFIG_FILE} "
133
+ done
134
+ )
128
135
}
129
136
130
137
function generate_postgresql_recovery_config() {
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change 24
24
25
25
pg_ctl -w start -o " -h ''"
26
26
if $PG_INITIALIZED ; then
27
- process_extending_files ${APP_DATA} /src/postgresql-init ${CONTAINER_SCRIPTS_PATH} /postgresql- init
27
+ process_extending_files ${APP_DATA} /src/postgresql-init ${CONTAINER_SCRIPTS_PATH} /init
28
28
migrate_db
29
29
create_users
30
30
fi
31
31
32
- process_extending_files ${APP_DATA} /src/postgresql-start-hook ${CONTAINER_SCRIPTS_PATH} /postgresql- start-hook
32
+ process_extending_files ${APP_DATA} /src/postgresql-start ${CONTAINER_SCRIPTS_PATH} /start
33
33
34
34
pg_ctl stop
35
35
Original file line number Diff line number Diff line change @@ -252,18 +252,26 @@ $ s2i build ~/image-configuration/ postgresql new-postgresql
252
252
The directory passed to ` s2i build ` should contain one or more of the
253
253
following directories:
254
254
255
- ##### ` postgresql-config / `
255
+ ##### ` postgresql-cfg / `
256
256
257
- contained configuration files (` *.conf ` ) will be included at the end of image postgresql.conf file during database initialization
257
+ Contained configuration files (` *.conf ` ) will be included at the end of image
258
+ postgresql.conf file.
258
259
259
260
260
261
##### ` postgresql-init/ `
261
262
262
- contained shell scripts (` *.sh ` ) are sourced once, when database is initialized
263
+ Contained shell scripts (` *.sh ` ) are sourced when the database is freshly
264
+ initialized (after successful initdb run which made the data directory
265
+ non-empty). At the time of sourcing these scripts, the local PostgreSQL
266
+ server is running. For re-deployments scenarios with persistent data
267
+ directory, the scripts are not sourced (no-op).
263
268
264
- ##### ` postgresql-start-hook/ `
265
269
266
- contained shell scripts (` *.sh ` ) are sourced before every start
270
+ ##### ` postgresql-start/ `
271
+
272
+ Same sematics as ` postgresql-init/ ` , except that these scripts are
273
+ always sourced (after ` postgresql-init/ ` scripts, if they exist).
274
+
267
275
268
276
----------------------------------------------
269
277
Original file line number Diff line number Diff line change @@ -125,6 +125,13 @@ function generate_postgresql_config() {
125
125
< " ${CONTAINER_SCRIPTS_PATH} /openshift-custom-postgresql-replication.conf.template" \
126
126
>> " ${POSTGRESQL_CONFIG_FILE} "
127
127
fi
128
+
129
+ (
130
+ shopt -s nullglob
131
+ for conf in " ${APP_DATA} " /src/postgresql-cfg/* .conf; do
132
+ echo include \' ${conf} \' >> " ${POSTGRESQL_CONFIG_FILE} "
133
+ done
134
+ )
128
135
}
129
136
130
137
function generate_postgresql_recovery_config() {
Load Diff This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 24
24
25
25
pg_ctl -w start -o " -h ''"
26
26
if $PG_INITIALIZED ; then
27
- process_extending_files ${APP_DATA} /src/postgresql-init ${CONTAINER_SCRIPTS_PATH} /postgresql- init
27
+ process_extending_files ${APP_DATA} /src/postgresql-init ${CONTAINER_SCRIPTS_PATH} /init
28
28
migrate_db
29
29
create_users
30
30
fi
31
31
32
- process_extending_files ${APP_DATA} /src/postgresql-start-hook ${CONTAINER_SCRIPTS_PATH} /postgresql- start-hook
32
+ process_extending_files ${APP_DATA} /src/postgresql-start ${CONTAINER_SCRIPTS_PATH} /start
33
33
34
34
pg_ctl stop
35
35
Original file line number Diff line number Diff line change @@ -252,18 +252,26 @@ $ s2i build ~/image-configuration/ postgresql new-postgresql
252
252
The directory passed to ` s2i build ` should contain one or more of the
253
253
following directories:
254
254
255
- ##### ` postgresql-config / `
255
+ ##### ` postgresql-cfg / `
256
256
257
- contained configuration files (` *.conf ` ) will be included at the end of image postgresql.conf file during database initialization
257
+ Contained configuration files (` *.conf ` ) will be included at the end of image
258
+ postgresql.conf file.
258
259
259
260
260
261
##### ` postgresql-init/ `
261
262
262
- contained shell scripts (` *.sh ` ) are sourced once, when database is initialized
263
+ Contained shell scripts (` *.sh ` ) are sourced when the database is freshly
264
+ initialized (after successful initdb run which made the data directory
265
+ non-empty). At the time of sourcing these scripts, the local PostgreSQL
266
+ server is running. For re-deployments scenarios with persistent data
267
+ directory, the scripts are not sourced (no-op).
263
268
264
- ##### ` postgresql-start-hook/ `
265
269
266
- contained shell scripts (` *.sh ` ) are sourced before every start
270
+ ##### ` postgresql-start/ `
271
+
272
+ Same sematics as ` postgresql-init/ ` , except that these scripts are
273
+ always sourced (after ` postgresql-init/ ` scripts, if they exist).
274
+
267
275
268
276
----------------------------------------------
269
277
Original file line number Diff line number Diff line change @@ -125,6 +125,13 @@ function generate_postgresql_config() {
125
125
< " ${CONTAINER_SCRIPTS_PATH} /openshift-custom-postgresql-replication.conf.template" \
126
126
>> " ${POSTGRESQL_CONFIG_FILE} "
127
127
fi
128
+
129
+ (
130
+ shopt -s nullglob
131
+ for conf in " ${APP_DATA} " /src/postgresql-cfg/* .conf; do
132
+ echo include \' ${conf} \' >> " ${POSTGRESQL_CONFIG_FILE} "
133
+ done
134
+ )
128
135
}
129
136
130
137
function generate_postgresql_recovery_config() {
Load Diff This file was deleted.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments