by danstiner

GitHub Readme.md

Heroku Buildpack: GeoLite2 GeoIP data

Build Status

This is an unofficial Heroku buildpack that installs the latest GeoLite2 City and Country free IP geolocation databases from MaxMind along with the libmaxminddb C library for fast lookups in the databases.

Note an older version of the Country database is available in any Heroku deploy via the packages geoip-bin, geoip-database, and libgeoip1 listed on https://devcenter.heroku.com/articles/stack-packages


The GeoLite2 databases are distributed under the Creative Commons Attribution-ShareAlike 4.0 International License. The official download page suggests the attribution requirement may be met by including the following in all advertising and documentation mentioning features of or use of the databases:

This product includes GeoLite2 data created by MaxMind, available from
<a href="http://www.maxmind.com">http://www.maxmind.com</a>.


$ heroku buildpacks:add https://github.com/danstiner/heroku-buildpack-geoip-geolite2.git

Django GeoIP2

Add to your settings.py file:


See https://docs.djangoproject.com/en/1.11/ref/contrib/gis/geoip2/ for installing the geoip2 Python library and usage examples.