mapseed / api

Legacy api for the Mapseed platform
https://mapseed.org
GNU General Public License v3.0
7 stars 7 forks source link

Heroku deployment issues with geo buildpacks #173

Closed lchogan closed 4 years ago

lchogan commented 4 years ago

I'm new to Heroku and Django so bear with me. I'm trying to deploy the API to Heroku and I have encountered a lot of issues with the geo buildpacks. If I try to deploy with the setup "out of the box" I get the following errors (see lines 6-11):

remote: Building source:
remote:
remote: -----> Multipack app detected
remote: =====> Downloading Buildpack: https://github.com/cyberdelia/heroku-geo-buildpack.git
remote: =====> Detected Framework: geos/gdal/proj
remote:        Using geos version: <?xml version="1.0" encoding="UTF-8"?>
remote:        Using gdal version: <?xml version="1.0" encoding="UTF-8"?>
remote:        Using proj version: <?xml version="1.0" encoding="UTF-8"?>
remote: /tmp/buildpackLrcda/bin/compile: line 73: [: too many arguments
remote: /tmp/buildpackLrcda/bin/compile: line 79: [: too many arguments
remote: /tmp/buildpackLrcda/bin/compile: line 85: [: too many arguments
remote: -----> Vendoring geo libraries done
remote: =====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-python.git
remote: =====> Detected Framework: Python
remote: -----> Installing dependencies with pip
remote: You are using pip version 7.1.2, however version 20.1.1 is available.
remote: You should consider upgrading via the 'pip install --upgrade pip' command.
remote:
remote: -----> Preparing static assets
remote:        Collectstatic configuration error. To debug, run:
remote:        $ heroku run python src/manage.py collectstatic --noinput
remote:
remote: Using release configuration from last framework (Python).
remote: -----> Discovering process types
remote:        Procfile declares types -> web, worker
remote:
remote: -----> Compressing...
remote:        Done: 47.5M
remote: -----> Launching...
remote:        Released v42

I also tried switching from cyberdelia/heroku-geo-buildpack.git to https://github.com/heroku/heroku-geo-buildpack which solves the first issue, but then when I go to run heroku run python src/manage.py I get this:

File "/app/.heroku/python/lib/python2.7/site-packages/django/contrib/gis/geos/libgeos.py", line 191, in geos_version_info
    raise GEOSException('Could not parse version info string "%s"' % ver)

Conversation about the second issue here: https://code.djangoproject.com/ticket/28441

If someone could share with me an updated build process I would be happy to update the docs to reflect that process. I have a couple of community projects I'm trying to kick off and I would love to get this to work and help others trying to do the same.

lchogan commented 4 years ago

I used the Docker deploy to Heroku instead using the Dockerfile in the repo. There were just too many issues with Heroku buildpacks.