Created
October 1, 2015 21:23
-
-
Save bufke/a6a9ba076a761be13c81 to your computer and use it in GitHub Desktop.
GeoDjango with docker-compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db: | |
image: mdillon/postgis | |
web: | |
build: . | |
command: ./manage.py runserver 0.0.0.0:8000 | |
volumes: | |
- .:/code | |
ports: | |
- "8000:8000" | |
links: | |
- db | |
- redis | |
environment: | |
DATABASE_URL: postgis://postgres:postgres@db:5432/postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.4 | |
ENV PYTHONUNBUFFERED 1 | |
RUN apt-get update ; apt-get --assume-yes install binutils libproj-dev gdal-bin | |
RUN wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2 | |
RUN tar -xjf geos-3.4.2.tar.bz2 | |
RUN cd geos-3.4.2; ./configure; make; make install | |
RUN wget http://download.osgeo.org/gdal/1.11.0/gdal-1.11.0.tar.gz | |
RUN tar -xzf gdal-1.11.0.tar.gz | |
RUN cd gdal-1.11.0; ./configure; make; make install | |
RUN mkdir /code | |
WORKDIR /code | |
ADD requirements.txt /code | |
RUN pip install -r requirements.txt | |
ADD . /code/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks @bufke. I upgrade gdal, proj and geos to latest version, and it still works.