hackoregon / transportation-system-backend

2018 repo for the transportation api backend
MIT License
8 stars 2 forks source link

Use a public Docker base image for API container #27

Closed znmeb closed 6 years ago

znmeb commented 6 years ago

This just requires merging the Dockerfile used to make the base image we're using now into DOCKERFILE.api.

BrianHGrant commented 6 years ago

The main reason I had packed some of the files into the image is to save some build time for devs, but this does add a layer of complexity, and probably not much gain, especially vs. security and ease of update. ok to change. As @kiniadit has added the requirements.txt in already, i agree it is only the update of the DOCKERFILE.api, basically adding the required geospatial libraries:

as per:

https://docs.djangoproject.com/en/2.0/ref/contrib/gis/install/geolibs/

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

https://github.com/hackoregon/transportation-systems-docker/blob/master/dockerfiles/GEODJANGO-DOCKERFILE

Using this and the already included pip packages, i was successfully able to run through the geodjango tutorial examples: https://docs.djangoproject.com/en/2.0/ref/contrib/gis/tutorial/ in a ssh session within the docker container. used this as a successful test on the original image.

With this done we can remove the original repo from the hackoregon team.

znmeb commented 6 years ago

Yeah - after I get the first shot at the congestion data done I'm planning to consolidate all my repos - I probably have six active ones ;-)

znmeb commented 6 years ago

Hmmm ... it doesn't need gdal-dev? Or is that coming in as a dependency of one of the others?

znmeb commented 6 years ago

IMHO we should wait on this till we start deploying to AWS. I don't want to change anything for the development environment given it's been almost a week and we're just now ready to merge the updates into staging.

znmeb commented 6 years ago

I can close this, right? We've done it IIRC.

bhgrant8 commented 6 years ago

closing this, opening new ticket for updating to examplar