pgracio / dhis2-docker

dhis2-docker
38 stars 32 forks source link

PostGIS extension does not exist #10

Closed rrowlands closed 7 years ago

rrowlands commented 7 years ago

Encountered this error during the SQL import process:

CREATE EXTENSION
COMMENT
ERROR:  could not open extension control file "/usr/share/postgresql/9.5/extension/postgis.control": No such file or directory
STATEMENT:  CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public;
ERROR:  extension "postgis" does not exist
STATEMENT:  COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions';

I believe the root cause of this issue is that your database Dockerfile is using FROM postgres instead of FROM postgis.

rrowlands commented 7 years ago

Looks like @jason-p-pickering added support for this in his fork.

https://github.com/jason-p-pickering/dhis2-docker

If we can pull request this it would be nice.

pgracio commented 7 years ago

Hi @rrowlands thanks for reporting this. I saw your PR but didn't have time yet to test. Did you test it?

rrowlands commented 7 years ago

Yes, it works for me. I see a lot less errors when booting the app now. I can't say that I ran some DHIS2 test suite or anything though, just booting the app and clicking around a little.

pgracio commented 7 years ago

Ok. I have also done some manual tests and it works. PR is merged and uploaded the image to Docker Hub.

We have a pipeline to run api tests that should help detecting some bugs with this new configuration. https://travis-ci.org/dhis2/api-tests

Thanks for contributing @rrowlands.