Does DO App Platform support GeoDjango and PostGIS (+ required libraries)?

Posted November 26, 2020 853 views
DjangoPython Frameworks

I’ve seen that DO App Platform support Django applications, but I haven’t found any information about its geographic extension, GeoDjango. I would use it together with Postgres that requires GEOS, GDAL, PROJ.4, PostGIS installed. Any information on this?


1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Our python buildpack installs libraries specified in your project’s requirements.txt file. GeoDjango may be a problem as it looks to depend on C-libraries which are not installed as part of the base image. We can explore adding this functionality in the future, but in the meantime I would recommend adding a Dockerfile to your repository.

While this tutorial isn’t specific to App Platform, Step 6 describes how to configure a Dockerfile for a Django project. When creating an application in App Platform, we will build and run the image from a Dockerfile (named Dockerfile) if we find one in the root of the project.

by Justin Ellingwood
by Hanif Jetha
Interested in Django but not sure where to start with Docker? This tutorial will walk you through first steps: modifying a sample Django application to work in a container-based environment, and building a container image for the Django and Gunicorn app.

Just to add that Digital Ocean’s “managed database” offering does seem to support Postgres extensions like postgis. Here’s a full list and instructions on how to enable them: