docker-postgresql icon indicating copy to clipboard operation
docker-postgresql copied to clipboard

Adding postgis

Open lwiechec opened this issue 10 years ago • 4 comments

Hi,

I needed to add support for PostGIS spatial extension, so - here it is.

PS: I really like your Docker image as it make is easy to enable clustering etc. Thanks for it!

lwiechec avatar Dec 18 '15 09:12 lwiechec

Thanks for the PR. Will need a little time to review the changes. Please bear.

sameersbn avatar Dec 18 '15 10:12 sameersbn

I extended your work from this PR which can be found in the postgis-extension-finalization branch. Here are the changesets.

One important change I have done is that I have removed the use of single-user mode during the setup. The postgres server is now started internally to complete the setup before it is reconfigured to accept external connections. This enables the use of CREATE EXTENSION statement to enable the PostGIS extension among other things.

At the moment, the PG_POSTGIS=true parameter controls the following statements:

CREATE EXTENSION IF NOT EXISTS postgis;
CREATE EXTENSION IF NOT EXISTS postgis_topology

Can you confirm that these are the only two that should be enabled? I have no experience using PostGIS. Can you please review and test the changes in the postgis-extension-finalization branch before it can be merged into the master?

Thank you.

sameersbn avatar Jan 10 '16 17:01 sameersbn

I just stumbled across this while looking in to building a postgresql container. As basic verification that the postgis stuff works, you could run the following SQL to verify that the extension is indeed installed as a part of your CI tests:

SELECT postgis_full_version();

skwash avatar Mar 12 '16 01:03 skwash

Hi, this seems to be idle for over a year now, any plan to get it merge ?

kayoubi avatar Feb 24 '17 06:02 kayoubi