Skip to content
This repository was archived by the owner on Sep 28, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git/
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM python:2.7

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8

ENV PG_MAJOR 9.5
ENV PG_VERSION 9.4+165+deb8u2

RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' ${PG_MAJOR} > /etc/apt/sources.list.d/pgdg.list

RUN apt-get update && apt-get install -y --no-install-recommends \
gdal-bin \
gettext \
postgresql-client=${PG_VERSION} \
&& rm -rf /var/lib/apt/lists/*

COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir \
numpy==$(grep "numpy" requirements.txt | cut -d= -f3) \
scipy==$(grep "scipy" requirements.txt | cut -d= -f3) \
&& pip install --no-cache-dir -r requirements.txt

COPY . /usr/src/app

RUN cp docs/config.dist.xml docs/config.xml \
&& (cd django/publicmapping && python setup.py ../../docs/config.xsd ../../docs/config.xml -v2 -d)

ENTRYPOINT ["python"]
CMD ["django/publicmapping/manage.py"]
19 changes: 19 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: "3"
services:
# database:
# image: quay.io/azavea/postgis:2.2-postgres9.5-slim
# environment:
# - POSTGRES_DB=district_builder
# - POSTGRES_USER=district_builder
# - POSTGRES_PASSWORD=district_builder

# redis:
# image: redis:2-alpine

django:
build: .
ports:
- "8080:8080"
command:
- "publicmapping/manage.py"
- "run_gunicorn"
14 changes: 8 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
Django==1.4.1
celery==3.0.15
django-celery==3.0.11
Gunicorn==19.7.1
psycopg2==2.7.3
Django==1.4.22
celery==3.1.23
django-celery==3.2.1
django-staticfiles==1.2.1
django-tagging==0.3.1
django-sld==1.0.7
inflect==0.2.3
xhtml2pdf==0.0.4
xhtml2pdf==0.0.6
django-compressor==1.2
python-sld==1.0.9
numpy==1.6.2
scipy==0.11.0
PIL==1.1.7
Pillow==1.7.8
PySAL==1.5.0
git+git://github.com/PublicMapping/modestmaps-py.git@db-mod_1.4
git+git://github.com/PublicMapping/django-rosetta.git@db-mod_2.0
redis==2.7.6

lxml==3.8.0