hackoregon / backend-examplar-2018

an example dockerized geo-aware django backend
MIT License
4 stars 5 forks source link

ADD option for Non-GeoDjango API container Config #22

Closed bhgrant8 closed 6 years ago

bhgrant8 commented 6 years ago

So a few questions that came up around the need for geodjango dependencies for all projects.

There are not too many of them, currently split off into the requirements.geodjango.txt file and this code block to add the spatial linux libraries in the dockerfile:

https://github.com/hackoregon/backend-examplar-2018/blob/staging/DOCKERFILE.api.development

RUN apt-get update && apt-get install -y \
  binutils \
  gdal-bin \
  libgeos-dev \
  libproj-dev \
&& rm -rf /var/lib/apt/lists/*

and to load the requirements:

COPY requirements/requirements.geodjango.txt /code/
RUN pip install -r requirements.geodjango.txt

and similar code in the staging container.

while we could write an alternate non-geodjango dockerfile, I think providing an ARG for geo dependencies in the DOCKERFILE might work, actually for both api and database. This would be available at runtime and remove if not needed.

znmeb commented 6 years ago

Yeah - I think this is pretty straightforward. Let's merge the database cleanup branch first, then finish off the create script - I almost have a hacked-up version working - and then do this.

znmeb commented 6 years ago

Should we close this? Odds are DevOps will deliver PostGIS and I'm guessing all the teams have some GIS in their APIs.

bhgrant8 commented 6 years ago

sounds good