Dockerfile based on BRT, test suite for module
This commit is contained in:
parent
398481abed
commit
ba9d082c94
22 changed files with 1007 additions and 0 deletions
28
root/usr/bin/run-postgresql
Executable file
28
root/usr/bin/run-postgresql
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
export ENABLE_REPLICATION=${ENABLE_REPLICATION:-false}
|
||||
|
||||
set -eu
|
||||
export_vars=$(cgroup-limits) ; export $export_vars
|
||||
|
||||
source "${CONTAINER_SCRIPTS_PATH}/common.sh"
|
||||
|
||||
set_pgdata
|
||||
check_env_vars
|
||||
generate_passwd_file
|
||||
generate_postgresql_config
|
||||
|
||||
if [ ! -f "$PGDATA/postgresql.conf" ]; then
|
||||
initialize_database
|
||||
NEED_TO_CREATE_USERS=yes
|
||||
fi
|
||||
|
||||
pg_ctl -w start -o "-h ''"
|
||||
if [ "${NEED_TO_CREATE_USERS:-}" == "yes" ]; then
|
||||
create_users
|
||||
fi
|
||||
set_passwords
|
||||
pg_ctl stop
|
||||
|
||||
unset_env_vars
|
||||
exec postgres "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue