#Heroku buildpack: GeoDjango
This is a Heroku buildpack for Python apps.
$ heroku create --buildpack git://github.com/dulaccc/heroku-buildpack-geodjango.git#1.1 $ git push heroku master ... -----> Python app detected -----> Installing runtime (python-2.7.9) -----> Checking for GDAL Fetching and installing GEOS 3.3.2 Caching ... GEOS installed -----> Checking for Proj.4 Fetching and installing Proj.4 4.7.0 Installing ... Proj.4 installed -----> Checking for GDAL Fetching and installing GDAL 1.8.1 Installing ... GDAL installed -----> Installing dependencies using pip Downloading/unpacking requests (from -r requirements.txt (line 1)) Installing collected packages: requests Successfully installed requests Cleaning up... -----> Discovering process types Procfile declares types -> (none)
You can also add it to upcoming builds of an existing application:
$ heroku buildpacks:set git://github.com/dulaccc/heroku-buildpack-geodjango.git#1.1
The buildpack will detect your app as Python if it has the file requirements.txt in the root.
It will use Pip to install your dependencies, vendoring a copy of the Python runtime into your slug.
Then you need to set two Django settings in order for
GDAL to work properly.
from os import environ GEOS_LIBRARY_PATH = environ.get('GEOS_LIBRARY_PATH') GDAL_LIBRARY_PATH = environ.get('GDAL_LIBRARY_PATH')
All libraries are stored in the directory
You can also provide arbitrary releases Python with a
$ cat runtime.txt python-3.4.3
Runtime options include:
Other unsupported runtimes are available as well.
Copy the snippet above into CLI.