-
-
Notifications
You must be signed in to change notification settings - Fork 579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is PostGIS missing? #1542
Comments
ddev has no postgres container and has never supported postgres, although the php-postgres extension is in there for those using postgres externally. Maybe you can give more information about your environment. Are you using Postgres? How? |
Ok, thanks for the explanation. I am using this
and additionally
|
Thanks - when you get this the way you like it it would be great to have a writeup about it. Now, is the problem you're having in the postgres container? If so, you'll need to solve it there. (it's https://hub.docker.com/_/postgres - you either have to derive from it, add to it, or whatever). |
Oh also... you'll want to use a docker volume for the postgres database storage, otherwise it will be destroyed every time you |
I first tried to use https://hub.docker.com/r/mdillon/postgis/ but then I noticed that somehow the php-postgres extension wasn't installed so I tried https://github.com/drud/ddev/tree/master/containers/ddev-webserver. But then the postgis wasn't available. If I understand correctly now I assume that the postgres container is missing postgis. Normally I would connect to the server and run Thank you very much for the hint about docker volume. I will make the needed changes. |
You can use |
Thanks a lot for your help and support. I will try to make it work and reply here if there's anything new. |
I got it working now. All thanks to @rfay. I used ddev to create the docker environment with
This will create a
This is currently needed since the php-postgres extension isn't available in the official branch, yet. Then I created a file
Like @rfay suggested I added a volume. I also used the I hope this all is the correct way to do. Again, thanks a lot for the friendly support of @rfay ! |
Just an FYI, because you're using dacostafilipe/ddev-webserver:master-pgsql, you're counting on that being updated as ddev gets updated, and you're depending on dacostafilipe. I'd sure like to see a more general and robust long-term solution to this. We're generally happy to add modest packages to the ddev-webserver container if they don't bloat it too much. |
Yes, I understand that normally using not official branches isn't the way to go. But since I saw that his branch had been merged into the drud:master branch (#1514) I assumed that it would be safe to use. If you want I can update my solution as soon as it's available in dockerhub. |
Ah, OK - That PR was pulled for the next release, #1514 So you'd be better to do this in your config.yaml until the next release, not introducing it in docker-compose.yaml:
|
Yes, that's the better solution. I will update my writeup above and close this ticket then. |
Glad it's working! In the next release, coming in May, the webimage workaround won't be required. Thanks for the report back. If there were lots of call for it we'd probably eventually explicitly support postgres. |
Hi,
I'm new to docker so I apologise in advance if I'm explaining myself bad.
I noticed that postGIS isn't part of the postgres container when I run
I get the following error
Shouldn't postGIS be part of this? If not, how should it be added to the container?
It would be nice to have some way to list in the yaml file that postgis (or in general other extensions of postgres) to be loaded when the container gets set up.
Thanks for your time
The text was updated successfully, but these errors were encountered: