docker-postgis/scripts/env-data.sh

433 wiersze
11 KiB
Bash
Czysty Zwykły widok Historia

#!/usr/bin/env bash
POSTGRES_MAJOR_VERSION=$(cat /tmp/pg_version.txt)
2021-01-05 17:09:48 +00:00
POSTGIS_MAJOR=$(cat /tmp/pg_major_version.txt)
POSTGIS_MINOR_RELEASE=$(cat /tmp/pg_minor_version.txt)
DEFAULT_DATADIR="/var/lib/postgresql/${POSTGRES_MAJOR_VERSION}/main"
# Commented for documentation. You can specify the location of
# pg_wal directory/volume using the following environment variable:
# POSTGRES_INITDB_WALDIR (default value is unset)
ROOT_CONF="/etc/postgresql/${POSTGRES_MAJOR_VERSION}/main"
Replication changes (#153) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Fix spacing in readme * Add replication user and enable postgis rasters drivers * Replicate from restricted IP address * use replication user for streaming changes * update README to higlight new changes * change permisions of default schema to enable replication * add missing env variables * Add logic to cater for destroy database on restart. It can be True or False on start and the logic will handle it * Fix issues due to feedback
2019-10-22 09:31:59 +00:00
PG_ENV="$ROOT_CONF/environment"
CONF="$ROOT_CONF/postgresql.conf"
WAL_ARCHIVE="/opt/archivedir"
RECOVERY_CONF="$ROOT_CONF/recovery.conf"
POSTGRES="/usr/lib/postgresql/${POSTGRES_MAJOR_VERSION}/bin/postgres"
INITDB="/usr/lib/postgresql/${POSTGRES_MAJOR_VERSION}/bin/initdb"
2021-01-05 17:09:48 +00:00
SQLDIR="/usr/share/postgresql/${POSTGRES_MAJOR_VERSION}/contrib/postgis-${POSTGIS_MAJOR}.${POSTGIS_MINOR_RELEASE}/"
SETVARS="POSTGIS_ENABLE_OUTDB_RASTERS=1 POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL"
LOCALONLY="-c listen_addresses='127.0.0.1'"
PG_BASEBACKUP="/usr/bin/pg_basebackup"
NODE_PROMOTION="/usr/lib/postgresql/${POSTGRES_MAJOR_VERSION}/bin/pg_ctl"
PGSTAT_TMP="/var/run/postgresql/"
PG_PID="/var/run/postgresql/${POSTGRES_MAJOR_VERSION}-main.pid"
Add locale initialisation (#144) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Add options for generating locales * added encoding and locale setup for the postgresql database cluster * Fix issue with min_wal_size affecting startup * add env variables to Readme
2019-09-06 11:47:42 +00:00
2021-06-10 16:27:48 +00:00
# Read data from secrets into env variables.
# usage: file_env VAR [DEFAULT]
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
function file_env {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
local val="$def"
if [ "${!var:-}" ]; then
val="${!var}"
elif [ "${!fileVar:-}" ]; then
val="$(< "${!fileVar}")"
fi
export "$var"="$val"
unset "$fileVar"
}
function boolean() {
case $1 in
[Tt][Rr][Uu][Ee] | [Yy][Ee][Ss])
echo 'TRUE'
;;
*)
echo 'FALSE'
;;
esac
}
file_env 'POSTGRES_PASS'
file_env 'POSTGRES_USER'
file_env 'POSTGRES_DBNAME'
function create_dir() {
DATA_PATH=$1
if [[ ! -d ${DATA_PATH} ]];
then
echo "Creating" ${DATA_PATH} "directory"
mkdir -p ${DATA_PATH}
fi
}
2021-06-06 15:36:15 +00:00
function generate_random_string() {
STRING_LENGTH=$1
random_pass_string=$(openssl rand -base64 ${STRING_LENGTH})
if [[ ! -f /scripts/.pass_${STRING_LENGTH}.txt ]]; then
echo ${random_pass_string} > /scripts/.pass_${STRING_LENGTH}.txt
fi
export RAND=$(cat /scripts/.pass_${STRING_LENGTH}.txt)
}
2021-06-06 15:36:15 +00:00
# Make sure we have a user set up
if [ -z "${POSTGRES_USER}" ]; then
POSTGRES_USER=docker
fi
2021-06-06 15:36:15 +00:00
if [ -z "${POSTGRES_PASS}" ]; then
generate_random_string 20
POSTGRES_PASS=${RAND}
fi
if [ -z "${POSTGRES_DBNAME}" ]; then
POSTGRES_DBNAME=gis
fi
2020-04-28 15:01:39 +00:00
# If datadir is not defined, then use this
if [ -z "${DATADIR}" ]; then
DATADIR=${DEFAULT_DATADIR}
fi
2021-06-06 15:36:15 +00:00
# RECREATE_DATADIR flag default value
# Always assume that we don't want to recreate datadir if not explicitly defined
# For issue: https://github.com/kartoza/docker-postgis/issues/226
if [ -z "${RECREATE_DATADIR}" ]; then
RECREATE_DATADIR=FALSE
else
RECREATE_DATADIR=$(boolean ${RECREATE_DATADIR})
fi
if [ -z "${SSL_DIR}" ]; then
SSL_DIR="/ssl_certificates"
fi
# SSL mode
if [ -z "${PGSSLMODE}" ]; then
PGSSLMODE=require
fi
# Enable hstore and topology by default
if [ -z "${HSTORE}" ]; then
HSTORE=true
fi
if [ -z "${TOPOLOGY}" ]; then
TOPOLOGY=true
fi
# Replication settings
if [ -z "${REPLICATION}" ]; then
REPLICATION=false
fi
if [ -z "${REPLICATE_PORT}" ]; then
REPLICATE_PORT=5432
fi
if [ -z "${DESTROY_DATABASE_ON_RESTART}" ]; then
DESTROY_DATABASE_ON_RESTART=true
fi
if [ -z "${PG_MAX_WAL_SENDERS}" ]; then
Align Develop to PostgreSQL 11 (#121) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases.
2019-02-20 10:28:14 +00:00
PG_MAX_WAL_SENDERS=10
fi
if [ -z "${PG_WAL_KEEP_SIZE}" ]; then
PG_WAL_KEEP_SIZE=20
fi
#Logical replication settings
if [ -z "${MAX_LOGICAL_REPLICATION_WORKERS}" ]; then
MAX_LOGICAL_REPLICATION_WORKERS=4
fi
if [ -z "${MAX_SYNC_WORKERS_PER_SUBSCRIPTION}" ]; then
MAX_SYNC_WORKERS_PER_SUBSCRIPTION=2
fi
if [ -z "${IP_LIST}" ]; then
IP_LIST='*'
fi
Optimisations (#143) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Added env variables for postgresql.conf and new settings available in PG 11 * Ad option to initialize WAL segment
2019-08-23 13:43:58 +00:00
if [ -z "${MAINTAINANCE_WORKERS}" ]; then
MAINTAINANCE_WORKERS=2
fi
if [ -z "${ARCHIVE_MODE}" ]; then
# https://www.postgresql.org/docs/12/runtime-config-wal.html
ARCHIVE_MODE=off
fi
if [ -z "${ARCHIVE_COMMAND}" ]; then
# https://www.postgresql.org/docs/12/continuous-archiving.html#BACKUP-ARCHIVING-WAL
ARCHIVE_COMMAND="test ! -f ${WAL_ARCHIVE}/%f && cp %p ${WAL_ARCHIVE}/%f"
fi
if [ -z "${RESTORE_COMMAND}" ]; then
# https://www.postgresql.org/docs/12/runtime-config-wal.html
RESTORE_COMMAND="cp ${WAL_ARCHIVE}/%f \"%p\""
fi
if [ -z "${ARCHIVE_CLEANUP_COMMAND}" ]; then
# https://www.postgresql.org/docs/12/runtime-config-wal.html
ARCHIVE_CLEANUP_COMMAND="pg_archivecleanup ${WAL_ARCHIVE} %r"
fi
if [ -z "${WAL_LEVEL}" ]; then
# https://www.postgresql.org/docs/12/runtime-config-wal.html
WAL_LEVEL=replica
fi
Optimisations (#143) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Added env variables for postgresql.conf and new settings available in PG 11 * Ad option to initialize WAL segment
2019-08-23 13:43:58 +00:00
if [ -z "${WAL_SIZE}" ]; then
Add locale initialisation (#144) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Add options for generating locales * added encoding and locale setup for the postgresql database cluster * Fix issue with min_wal_size affecting startup * add env variables to Readme
2019-09-06 11:47:42 +00:00
WAL_SIZE=4GB
fi
if [ -z "${MIN_WAL_SIZE}" ]; then
MIN_WAL_SIZE=1024MB
Optimisations (#143) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Added env variables for postgresql.conf and new settings available in PG 11 * Ad option to initialize WAL segment
2019-08-23 13:43:58 +00:00
fi
Add locale initialisation (#144) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Add options for generating locales * added encoding and locale setup for the postgresql database cluster * Fix issue with min_wal_size affecting startup * add env variables to Readme
2019-09-06 11:47:42 +00:00
if [ -z "${WAL_SEGSIZE}" ]; then
WAL_SEGSIZE=32
fi
if [ -z "${SHARED_BUFFERS}" ]; then
SHARED_BUFFERS=256MB
fi
if [ -z "${WORK_MEM}" ]; then
WORK_MEM=16MB
fi
if [ -z "${WAL_BUFFERS}" ]; then
WAL_BUFFERS=1MB
Add locale initialisation (#144) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Add options for generating locales * added encoding and locale setup for the postgresql database cluster * Fix issue with min_wal_size affecting startup * add env variables to Readme
2019-09-06 11:47:42 +00:00
fi
Optimisations (#143) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Added env variables for postgresql.conf and new settings available in PG 11 * Ad option to initialize WAL segment
2019-08-23 13:43:58 +00:00
if [ -z "${CHECK_POINT_TIMEOUT}" ]; then
CHECK_POINT_TIMEOUT=30min
fi
if [ -z "${MAX_WORKERS}" ]; then
MAX_WORKERS=4
fi
Add locale initialisation (#144) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Add options for generating locales * added encoding and locale setup for the postgresql database cluster * Fix issue with min_wal_size affecting startup * add env variables to Readme
2019-09-06 11:47:42 +00:00
if [ -z "${MAINTAINANCE_WORK_MEM}" ]; then
MAINTAINANCE_WORK_MEM=128MB
Optimisations (#143) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Added env variables for postgresql.conf and new settings available in PG 11 * Ad option to initialize WAL segment
2019-08-23 13:43:58 +00:00
fi
if [ -z "${SSL_CERT_FILE}" ]; then
SSL_CERT_FILE='/etc/ssl/certs/ssl-cert-snakeoil.pem'
fi
if [ -z "${SSL_KEY_FILE}" ]; then
SSL_KEY_FILE='/etc/ssl/private/ssl-cert-snakeoil.key'
fi
Align Develop to PostgreSQL 11 (#121) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases.
2019-02-20 10:28:14 +00:00
if [ -z "${POSTGRES_MULTIPLE_EXTENSIONS}" ]; then
if [[ $(dpkg -l | grep "timescaledb") > /dev/null ]];then
POSTGRES_MULTIPLE_EXTENSIONS='postgis,hstore,postgis_topology,postgis_raster,pgrouting,timescaledb'
else
POSTGRES_MULTIPLE_EXTENSIONS='postgis,hstore,postgis_topology,postgis_raster,pgrouting'
fi
Align Develop to PostgreSQL 11 (#121) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases.
2019-02-20 10:28:14 +00:00
fi
Add locale initialisation (#144) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Add options for generating locales * added encoding and locale setup for the postgresql database cluster * Fix issue with min_wal_size affecting startup * add env variables to Readme
2019-09-06 11:47:42 +00:00
Fix install of pg_cron extension (#197) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Fix spacing in readme * Add replication user and enable postgis rasters drivers * Replicate from restricted IP address * use replication user for streaming changes * update README to higlight new changes * change permisions of default schema to enable replication * add missing env variables * Add logic to cater for destroy database on restart. It can be True or False on start and the logic will handle it * fix for version 12 upgrade * add postgis raster extension * Small fixes for postgresql 12 * Modified docker-compose to run against pg 12 * remove duplicated env * Build point cloud and other custome extension, add plpython and pgcron * Disable building community extensions * fix reference to port in docker compose * Cleanup readme * Remove building extensions as this can be done by entrypoint scripts * fix pg cron installation in multiple databases * added setting to prevent pg_cron reinitialised multiple times Co-authored-by: Tim Sutton <tim@kartoza.com> Co-authored-by: Rizky Maulana Nugraha <lana.pcfre@gmail.com>
2020-01-29 05:59:54 +00:00
Replication changes (#153) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Fix spacing in readme * Add replication user and enable postgis rasters drivers * Replicate from restricted IP address * use replication user for streaming changes * update README to higlight new changes * change permisions of default schema to enable replication * add missing env variables * Add logic to cater for destroy database on restart. It can be True or False on start and the logic will handle it * Fix issues due to feedback
2019-10-22 09:31:59 +00:00
if [ -z "${ALLOW_IP_RANGE}" ]; then
ALLOW_IP_RANGE='0.0.0.0/0'
fi
Add locale initialisation (#144) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Add options for generating locales * added encoding and locale setup for the postgresql database cluster * Fix issue with min_wal_size affecting startup * add env variables to Readme
2019-09-06 11:47:42 +00:00
if [ -z "${DEFAULT_ENCODING}" ]; then
DEFAULT_ENCODING="UTF8"
fi
Fix locale init confirgurations (#204) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Fix spacing in readme * Add replication user and enable postgis rasters drivers * Replicate from restricted IP address * use replication user for streaming changes * update README to higlight new changes * change permisions of default schema to enable replication * add missing env variables * Add logic to cater for destroy database on restart. It can be True or False on start and the logic will handle it * fix for version 12 upgrade * add postgis raster extension * Small fixes for postgresql 12 * Modified docker-compose to run against pg 12 * remove duplicated env * Build point cloud and other custome extension, add plpython and pgcron * Disable building community extensions * fix reference to port in docker compose * Cleanup readme * Remove building extensions as this can be done by entrypoint scripts * fix pg cron installation in multiple databases * fix encoding issues and database startup configs * Fix encoding for psql client using env variable Co-authored-by: Tim Sutton <tim@kartoza.com> Co-authored-by: Rizky Maulana Nugraha <lana.pcfre@gmail.com>
2020-02-15 16:37:37 +00:00
if [ -z "${PGCLIENTENCODING}" ]; then
PGCLIENTENCODING="UTF8"
fi
Add locale initialisation (#144) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Add options for generating locales * added encoding and locale setup for the postgresql database cluster * Fix issue with min_wal_size affecting startup * add env variables to Readme
2019-09-06 11:47:42 +00:00
if [ -z "${DEFAULT_COLLATION}" ]; then
DEFAULT_COLLATION="en_US.UTF-8"
fi
if [ -z "${DEFAULT_CTYPE}" ]; then
DEFAULT_CTYPE="en_US.UTF-8"
fi
Align develop with 12.0 branch (#159) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Fix spacing in readme * Add replication user and enable postgis rasters drivers * Replicate from restricted IP address * use replication user for streaming changes * update README to higlight new changes * change permisions of default schema to enable replication * add missing env variables * Add logic to cater for destroy database on restart. It can be True or False on start and the logic will handle it * fix for version 12 upgrade * add postgis raster extension * Small fixes for postgresql 12 * Modified docker-compose to run against pg 12
2019-11-25 12:47:29 +00:00
if [ -z "${TARGET_TIMELINE}" ]; then
TARGET_TIMELINE='latest'
fi
if [ -z "${TARGET_ACTION}" ]; then
TARGET_ACTION='promote'
fi
if [ -z "${REPLICATION_USER}" ]; then
REPLICATION_USER=replicator
fi
if [ -z "${REPLICATION_PASS}" ]; then
generate_random_string 22
REPLICATION_PASS=${RAND}
fi
if [ -z "$IGNORE_INIT_HOOK_LOCKFILE" ]; then
IGNORE_INIT_HOOK_LOCKFILE=false
fi
if [ -z "$EXTRA_CONF" ]; then
EXTRA_CONF=""
fi
if [ -z "${SHARED_PRELOAD_LIBRARIES}" ]; then
if [[ $(dpkg -l | grep "timescaledb") > /dev/null ]];then
SHARED_PRELOAD_LIBRARIES='pg_cron,timescaledb'
else
SHARED_PRELOAD_LIBRARIES='pg_cron'
fi
fi
if [ -z "$PASSWORD_AUTHENTICATION" ]; then
PASSWORD_AUTHENTICATION="scram-sha-256"
fi
2021-03-01 06:42:38 +00:00
if [ -z "${ALL_DATABASES}" ]; then
ALL_DATABASES=FALSE
fi
2021-05-04 11:10:19 +00:00
if [ -z "${FORCE_SSL}" ]; then
FORCE_SSL=FALSE
fi
if [ -z "${ACCEPT_TIMESCALE_TUNING}" ]; then
ACCEPT_TIMESCALE_TUNING=FALSE
fi
if [ -z "${TIMESCALE_TUNING_PARAMS}" ]; then
TIMESCALE_TUNING_PARAMS=
fi
# Compatibility with official postgres variable
# Official postgres variable gets priority
if [ -n "${POSTGRES_PASSWORD}" ]; then
POSTGRES_PASS=${POSTGRES_PASSWORD}
fi
if [ -n "${PGDATA}" ]; then
DATADIR=${PGDATA}
fi
if [ -n "${POSTGRES_DB}" ]; then
POSTGRES_DBNAME=${POSTGRES_DB}
fi
if [ -n "${POSTGRES_INITDB_ARGS}" ]; then
INITDB_EXTRA_ARGS=${POSTGRES_INITDB_ARGS}
fi
Fix install of pg_cron extension (#197) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Merge develop to master to align with PostgreSQL 11 (#117) * Added note about version number * README update * Revert to using pg 9.3 in latest build - prevent breaking downstream apps for now * Revert to pg 9.3 * Fix references to 9.4 to make them 9.3 rather * Fix incorrect version in 9.4 branch * Fix TOPOLOGY conditional typo * Update run-postgis-docker.sh * Update run-postgis-docker.sh added IPADDRESS * Updates from Marco * Allow connections from 192.168 private network too * start temporary server in local-only mode, poll instead of blind wait, preserve pid 1 * Enable PostGIS Out DB raster support http://postgis.net/2015/05/02/tip_enable_raster_drivers/ http://postgis.net/docs/postgis_installation.html#install_short_version * Remove hardcoded reference to container name "docker" * upgrade postgres to 9.5 and postgis to 2.2 * Added flexible IP range as arg on docker run * Added better description to docker env vars * Updated references to pg and postgis versions in readme * Followup 0745c488, fix references to 9.4 * problem version postgresql version is 9.4, instead of 9.5 * Added note about allowing external ports. * Update README.md * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * 9.5 2.2 (#49) * Allow connections from 192.168 private network too * Updated references to pg and postgis versions in readme * Cleanups to 9.5 branch - remove old supervisor files * Fix for README * Dont add supervisor stuff which is deprecated * Fix 9.4 reference * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#58) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Merge improvements from 9.5 branch (#60) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * 9.5 2.2 (#59) * Allow changing the default database name (#50) * Commented out legacy scripts since it seems they are removed in 2.2 * Improve start (#57) * Make initial dir optional * Improve termination of background initial process #56 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * 9.5 2.2 (#61) * Allow changing the default database name (#50) * Allow changing the default database name (#50) * Allow changing the default database name (#50) (#52) * Commented out legacy scripts since it seems they are removed in 2.2 * Added more options to convenience run script * Added missing l from getopts * Added missing l from getopts * Tweak convenience scripts (#62) * Added missing l from getopts * allow connection when using docker compose (#65) see https://github.com/docker/compose/issues/4336 and https://github.com/kartoza/docker-postgis/issues/40 * Install gnupg for fetching keys first * Fix key fetching * Updated to 9.6 and postgis 2.4 * Ditch apt-cacher stuff * Upgraded to PG 10 * change version from postgresql-10.0 to 10 and fix typo in run-postgis… (#76) * change version from postgresql-10.0 to 10 and fix typo in run-postgis file * edit setup.sh to version 10 * Change from version 10.0 to 10 in Dockerfile (#75) I checked that postgresql-10.0 is an invalid name. It should be just postgresql-10 * Fixes for pg 10 to start nicely * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Fix #90 and replace references to slave with replicant (Slave is a pejorative term) * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Merge branch 10 into develop (#113) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Port changes for Postgres version 11 (#114) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Port changes to 11 branch (#115) * Fix typo in helper script * Port work in develop to 10 branch (#90) * Port 9.6 to develop (#89) * Part one of porting work from 9.6 to 10 * Backported more scripts from 9.6 branch * Added missing apt update in dockerfile * Updates to entrypoint to reference image and update docker-compose to reference 10 pg * Added sample and docs from 9.6 branch * Removed my diagram as Rizky had already added one * Fix env paths for pg 10 * Fixes for backporting work from 9.6 to 10 - dbb now spins up and accepts connections properly * Update README.md * Backport from branch: 9.6-2.4 Fix default datadir - Change into default datadir - Add small unittest * Optimise PostgreSQL performance and align with the changes done in 9.6 version * Fix version numbers * Minor change to correct env file * Merged 10 branch into develop * Remove reduntant conf file from dockerfile * Remove reduntant conf file directive from setup script * Remove reduntant conf file directive from script * Migrate settings to be compatible with PostgreSQL version 11 * fix ssl setup * Align changes to postgresql version 11 * Set destroy database to false * Commented out code for destroy database * Fix version number for build * Implement conf lock file check (#116) It will make sure that the conf file will only be generated once for a given container. * Added new configuration in recovery.conf and postgres optimisations for master-slave replication * Added new configuration in recovery.conf and postgres optimisations for master-slave replication (#118) * Remove template logic and use plain create extension (#119) * Remove template logic and added option to create multiple databases and extensions * Fix travis error * More optimisations for replication * Fix logic for checking if database exists since we now can create multiple databases. * Added Licence file * add option to mount certificates * fix comments in PR about mounting SSL * Align to develop upstream * Add OGR FDW to the installation and activate it in the docker-compose * Fix spacing in readme * Add replication user and enable postgis rasters drivers * Replicate from restricted IP address * use replication user for streaming changes * update README to higlight new changes * change permisions of default schema to enable replication * add missing env variables * Add logic to cater for destroy database on restart. It can be True or False on start and the logic will handle it * fix for version 12 upgrade * add postgis raster extension * Small fixes for postgresql 12 * Modified docker-compose to run against pg 12 * remove duplicated env * Build point cloud and other custome extension, add plpython and pgcron * Disable building community extensions * fix reference to port in docker compose * Cleanup readme * Remove building extensions as this can be done by entrypoint scripts * fix pg cron installation in multiple databases * added setting to prevent pg_cron reinitialised multiple times Co-authored-by: Tim Sutton <tim@kartoza.com> Co-authored-by: Rizky Maulana Nugraha <lana.pcfre@gmail.com>
2020-01-29 05:59:54 +00:00
list=(`echo ${POSTGRES_DBNAME} | tr ',' ' '`)
arr=(${list})
SINGLE_DB=${arr[0]}
if [ -z "${TIMEZONE}" ]; then
TIMEZONE='Etc/UTC'
fi
# usable function definitions
function kill_postgres {
PID=`cat ${PG_PID}`
kill -TERM ${PID}
# Wait for background postgres main process to exit
# wait until PID file gets deleted
while ls -A ${PG_PID} 2> /dev/null; do
sleep 1
done
return 0
}
function restart_postgres {
kill_postgres
# Brought postgres back up again
source /scripts/env-data.sh
su - postgres -c "$SETVARS $POSTGRES -D $DATADIR -c config_file=$CONF &"
# wait for postgres to come up
until su - postgres -c "pg_isready"; do
sleep 1
done
echo "postgres ready"
return 0
}
# Running extended script or sql if provided.
# Useful for people who extends the image.
function entry_point_script {
SETUP_LOCKFILE="/docker-entrypoint-initdb.d/.entry_point.lock"
# If lockfile doesn't exists, proceed.
if [[ ! -f "${SETUP_LOCKFILE}" ]] || [ "${IGNORE_INIT_HOOK_LOCKFILE}" == true ]; then
if find "/docker-entrypoint-initdb.d" -mindepth 1 -print -quit 2>/dev/null | grep -q .; then
for f in /docker-entrypoint-initdb.d/*; do
export PGPASSWORD=${POSTGRES_PASS}
case "$f" in
*.sql) echo "$0: running $f";
if [[ "${ALL_DATABASES}" =~ [Ff][Aa][Ll][Ss][Ee] ]]; then
psql ${SINGLE_DB} -U ${POSTGRES_USER} -p 5432 -h localhost -f ${f} || true
else
for db in $(echo ${POSTGRES_DBNAME} | tr ',' ' '); do
psql ${db} -U ${POSTGRES_USER} -p 5432 -h localhost -f ${f} || true
done
fi;;
*.sql.gz) echo "$0: running $f";
if [[ "${ALL_DATABASES}" =~ [Ff][Aa][Ll][Ss][Ee] ]]; then
gunzip < "$f" | psql ${SINGLE_DB} -U ${POSTGRES_USER} -p 5432 -h localhost || true
else
for db in $(echo ${POSTGRES_DBNAME} | tr ',' ' '); do
gunzip < "$f" | psql ${db} -U ${POSTGRES_USER} -p 5432 -h localhost || true
done
fi;;
*.sh) echo "$0: running $f"; . $f || true;;
*) echo "$0: ignoring $f" ;;
esac
echo
done
# Put lock file to make sure entry point scripts were run
touch ${SETUP_LOCKFILE}
fi
fi
return 0
}
function configure_replication_permissions {
echo "Setup data permissions"
echo "----------------------"
chown -R postgres:postgres $(getent passwd postgres | cut -d: -f6)
su - postgres -c "echo \"${REPLICATE_FROM}:${REPLICATE_PORT}:*:${REPLICATION_USER}:${REPLICATION_PASS}\" > ~/.pgpass"
su - postgres -c "chmod 0600 ~/.pgpass"
}
function streaming_replication {
until su - postgres -c "${PG_BASEBACKUP} -X stream -h ${REPLICATE_FROM} -p ${REPLICATE_PORT} -D ${DATADIR} -U ${REPLICATION_USER} -R -vP -w --label=gis_pg_custer"
do
echo "Waiting for master to connect..."
sleep 1s
if [[ "$(ls -A ${DATADIR})" ]]; then
echo "Need empty folder. Cleaning directory..."
rm -rf ${DATADIR}/*
fi
done
}
2021-06-06 15:36:15 +00:00
2021-06-10 16:27:48 +00:00