Skip to content

Commit

Permalink
Merge develop changes to 12 image (#230)
Browse files Browse the repository at this point in the history
* 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

* Extra conf (#156)

* Add EXTRA_CONF environment variable

* Improve readme

* Add EXTRA_CONF default vale in env-data.sh

* 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

* Remove duplicated code (#161)

* 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

* Also install pointcloud (#163)

* Also install pointcloud

* Build Pointcloud against PostgreSQL 12, not 11

* Added extensions building script (#164)

* 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

* Updated comments in docker-compose.yml (#165)

* Removed useless comment

* Updated comment about extensions

* Added doc for ogr_fdw,pointcloud,pointcloud_postgis extensions

* Disable automatic builds of community extensions (#173)

* 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

* Allow bash script for entrypoint initialization

* Fix unittest

* Fix port number (#178)

* 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)

* …
  • Loading branch information
14 people committed Apr 11, 2020
1 parent 0782a58 commit 07492f8
Show file tree
Hide file tree
Showing 31 changed files with 934 additions and 107 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -3,3 +3,6 @@
*/replication/pg-*
*/replication/docker-compose.override.yml
.DS_Store
.python-version
venv
__pycache__
28 changes: 12 additions & 16 deletions .travis.yml
Expand Up @@ -6,22 +6,18 @@ services:
- docker

python:
- '2.7'
- '3.5'
- '3.6.7'
- '3.7.1'
- '3.7'

script:
- ./build.sh
- pushd sample/replication
- make up
- make status
# Check for database status
- until make check-master-running; do echo "Retrying"; sleep 5; done
- until make check-slave-running; do echo "Retrying"; sleep 5; done
env:
- SCENARIO=datadir_init
- SCENARIO=replications
- SCENARIO=collations

before_script:
- ./build-test.sh

# Check replications
- until make check-master-replication; do echo "Retrying"; make master-log-tail; sleep 5; done
- sleep 60 # Wait replication finished
- until make check-slave-replication; do echo "Retrying"; make slave-log-tail; sleep 5; done
script:
- pushd scenario_tests/${SCENARIO}
- ./test.sh
- popd

16 changes: 16 additions & 0 deletions Dockerfile.test
@@ -0,0 +1,16 @@
#--------- Generic stuff all our Dockerfiles should start with so we get caching ------------
FROM kartoza/postgis:manual-build

# For testing

COPY scenario_tests/utils/requirements.txt /lib/utils/requirements.txt

RUN set -eux \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get -y --no-install-recommends install python3-pip \
&& apt-get -y --purge autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install -r /lib/utils/requirements.txt
67 changes: 62 additions & 5 deletions README.md
Expand Up @@ -91,6 +91,50 @@ docker run --name "postgis" -p 25432:5432 -d -t kartoza/postgis

## Environment variables

#### Cluster Initializations

With minimum setup, our image will use initial cluster located in the
`DATADIR` environment variable. If you want to use persistence, mount these
location into your volume/host. By default, `DATADIR` will point to `/var/lib/postgresql/{major-version}`.
You can instead mount the parent location like this:

* `-v data-volume:/var/lib/postgresql`

This default cluster will be initialized with default locale settings `C.UTF-8`.
If, for instance, you want to create a new cluster with your own settings (not using the default cluster).
You need to specify different empty directory, like this

```shell script
-v data-volume:/opt/postgres/data \
-e DATADIR:/opt/postgres/data \
-e DEFAULT_ENCODING="UTF8" \
-e DEFAULT_COLLATION="id_ID.utf8" \
-e DEFAULT_CTYPE="id_ID.utf8" \
-e INITDB_EXTRA_ARGS="<some more initdb command args>"
```

The containers will use above parameters to initialize a new db cluster in the
specified directory. If the directory is not empty, then initialization parameter will be ignored.

These are some initialization parameter that will only be used to initialize new cluster.
If the container uses existing cluster, it will be ignored (for example, when the container restarts).

* `DEFAULT_ENCODING`: cluster encoding
* `DEFAULT_COLLATION`: cluster collation
* `DEFAULT_CTYPE`: cluster ctype
* `WAL_SEGSIZE`: WAL segsize option
* `INITDB_EXTRA_ARGS`: extra parameter that will be passed down to `initdb` command

In addition to that, we have another parameter: `RECREATE_DATADIR` that can be used to force database reinitializations.
If this parameter is specified as `TRUE` it will act as explicit consent to delete `DATADIR` and create
new db cluster.

* `RECREATE_DATADIR`: Force database reinitializations in the location `DATADIR`

If you used `RECREATE_DATADIR` and successfully created new cluster. Remember
that you should remove this parameter afterwards. Because, if it was not omitted,
it will always recreate new db cluster after every container restarts.

#### Basic configuration

You can use the following environment variables to pass a
Expand Down Expand Up @@ -152,10 +196,11 @@ You can also define any other configuration to add to `postgres.conf`, separated

* `-e EXTRA_CONF="log_destination = 'stderr'\nlogging_collector = on"`

If you plan on migrating the image and continue using the data directory you need to pass

* EXISTING_DATA_DIR=true
If you want to reinitialize the data directory from scratch, you need to do:

1. Do backup, move data, etc. Any preparations before deleting your data directory.
2. Set environment variables `RECREATE_DATADIR=TRUE`. Restart the service
3. The service will delete your `DATADIR` directory and start reinitializing your data directory from scratch.

## Docker secrets

Expand Down Expand Up @@ -414,13 +459,25 @@ The database cluster is initialised with the following encoding settings
-E "UTF8" --lc-collate="en_US.UTF-8" --lc-ctype="en_US.UTF-8"
`

or

`
-E "UTF8" --lc-collate="C.UTF-8" --lc-ctype="C.UTF-8"
`

If you use default `DATADIR` location.

If you need to setup a database cluster with other encoding parameters you need
to pass the environment variables
to pass the environment variables when you initialize the cluster.

* -e DEFAULT_ENCODING="UTF8"
* -e DEFAULT_COLLATION="en_US.UTF-8"
* -e DEFAULT_CTYPE="en_US.UTF-8"

Initializing a new cluster can be done by using different `DATADIR` location and
mounting an empty volume. Or use parameter `RECREATE_DATADIR` to forcefully
delete the current cluster and create a new one. Make sure to remove parameter
`RECREATE_DATADIR` after creating the cluster.

See [the postgres documentation about encoding](https://www.postgresql.org/docs/11/multibyte.html) for more information.

Expand All @@ -429,6 +486,6 @@ See [the postgres documentation about encoding](https://www.postgresql.org/docs/

Tim Sutton (tim@kartoza.com)
Gavin Fleming (gavin@kartoza.com)
Risky Maulana (rizky@kartoza.com)
Rizky Maulana (rizky@kartoza.com)
Admire Nyakudya (admire@kartoza.com)
December 2018
5 changes: 5 additions & 0 deletions build-test.sh
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

./build.sh

docker build -t kartoza/postgis:manual-build -f Dockerfile.test .
43 changes: 2 additions & 41 deletions docker-entrypoint.sh
@@ -1,8 +1,9 @@
#!/usr/bin/env bash

# This script will run as the postgres user due to the Dockerfile USER directive
set -e

source /env-data.sh

# Setup postgres CONF file

source /setup-conf.sh
Expand All @@ -14,46 +15,6 @@ source /setup-ssl.sh

source /setup-pg_hba.sh



# 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 [[ -f "${SETUP_LOCKFILE}" ]]; then
return 0
else
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"; psql ${SINGLE_DB} -U ${POSTGRES_USER} -p 5432 -h localhost -f ${f} || true ;;
*.sql.gz) echo "$0: running $f"; gunzip < "$f" | psql ${SINGLE_DB} -U ${POSTGRES_USER} -p 5432 -h localhost || true ;;
*.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}
else
return 0
fi

fi

}

function kill_postgres {
PID=`cat ${PG_PID}`
kill -TERM ${PID}

# Wait for background postgres main process to exit
while [[ "$(ls -A ${PG_PID} 2>/dev/null)" ]]; do
sleep 1
done
}

if [[ -z "$REPLICATE_FROM" ]]; then
# This means this is a master instance. We check that database exists
echo "Setup master database"
Expand Down
105 changes: 85 additions & 20 deletions env-data.sh
Expand Up @@ -41,6 +41,17 @@ function file_env {
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'
Expand All @@ -55,6 +66,18 @@ fi
if [ -z "${POSTGRES_DBNAME}" ]; then
POSTGRES_DBNAME=gis
fi
# If datadir is defined use this
if [ -n "${DATADIR}" ]; then
DATADIR=${DATADIR}
fi
# 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
# SSL mode
if [ -z "${PGSSLMODE}" ]; then
PGSSLMODE=require
Expand Down Expand Up @@ -192,37 +215,79 @@ fi

# Compatibility with official postgres variable
# Official postgres variable gets priority
if [ ! -z "${POSTGRES_PASSWORD}" ]; then
if [ -n "${POSTGRES_PASSWORD}" ]; then
POSTGRES_PASS=${POSTGRES_PASSWORD}
fi
if [ ! -z "${PGDATA}" ]; then
if [ -n "${PGDATA}" ]; then
DATADIR=${PGDATA}
fi

if [ ! -z "$POSTGRES_DB" ]; then
if [ -n "${POSTGRES_DB}" ]; then
POSTGRES_DBNAME=${POSTGRES_DB}
fi

if [ -n "${POSTGRES_INITDB_ARGS}" ]; then
INITDB_EXTRA_ARGS=${POSTGRES_INITDB_ARGS}
fi

list=(`echo ${POSTGRES_DBNAME} | tr ',' ' '`)
arr=(${list})
SINGLE_DB=${arr[0]}


# 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 {
PID=`cat ${PG_PID}`
kill -TERM ${PID}

# Wait for background postgres main process to exit
while [[ "$(ls -A ${PG_PID} 2>/dev/null)" ]]; do
sleep 1
done

# Brought postgres back up again
source /env-data.sh
su - postgres -c "${POSTGRES} -D ${DATADIR} -c config_file=${CONF} ${LOCALONLY} &"

# wait for postgres to come up
until su - postgres -c "psql -l"; do
sleep 1
done
echo "postgres ready"

kill_postgres

# Brought postgres back up again
source /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}" ]]; 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"; psql ${SINGLE_DB} -U ${POSTGRES_USER} -p 5432 -h localhost -f ${f} || true ;;
*.sql.gz) echo "$0: running $f"; gunzip < "$f" | psql ${SINGLE_DB} -U ${POSTGRES_USER} -p 5432 -h localhost || true ;;
*.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
}
1 change: 1 addition & 0 deletions scenario_tests/.gitignore
@@ -0,0 +1 @@
docker-compose.override.yml

0 comments on commit 07492f8

Please sign in to comment.