[GIS] How to use GDAL on Heroku

gdalherokupython

I have a geospatial python app that I want to use on Heroku.

This is my requirements.txt file:

Flask==0.10.1
Jinja2==2.7.2
MarkupSafe==0.19
Werkzeug==0.9.4
gunicorn==18.0
itsdangerous==0.23
numpy==1.8.0
requests==2.2.1
wsgiref==0.1.2

I want to use the heroku-buildpack-geodjango to install Python GDAL.
I create and do a git push.

heroku create --stack cedar --buildpack http://github.com/dulaccc/heroku-buildpack-geodjango/

git push heroku master

This all works fine. However the app crashes because it doesn't find GDAL.

These are my logs:

$ heroku logs
...
2014-03-23T18:57:08.224720+00:00 app[web.1]: ImportError: No module named osgeo
2014-03-23T18:57:08.348803+00:00 app[web.1]: 2014-03-23 18:57:08 [2] [INFO] Shutting down: Master
2014-03-23T18:57:08.348803+00:00 app[web.1]: 2014-03-23 18:57:08 [2] [INFO] Reason: Worker failed to boot.
...

How do I set up GDAL in order to work properly?

Best Answer

You can add a build pack following these directions from heroku.

Related Question