-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2181 from unicef/staging
Staging
- Loading branch information
Showing
182 changed files
with
4,112 additions
and
5,189 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,38 @@ | ||
FROM python:3.6.4-jessie | ||
# python:3.6.4-jessie has python 2.7 and 3.6 installed, and packages | ||
# available to install 3.4 | ||
FROM python:3.6.4-alpine | ||
# test-base-p3-v2 | ||
RUN echo "http://dl-3.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories | ||
RUN apk update | ||
RUN apk add --upgrade apk-tools | ||
|
||
# Install dependencies | ||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
libcurl4-openssl-dev \ | ||
libjpeg-dev \ | ||
vim \ | ||
ntp \ | ||
git-core | ||
RUN apt-get install -y --no-install-recommends \ | ||
python-pip \ | ||
postgresql-client \ | ||
libpq-dev \ | ||
python3-dev | ||
RUN apt-get install -y --no-install-recommends \ | ||
python-gdal \ | ||
gdal-bin \ | ||
libgdal-dev \ | ||
libgdal1h \ | ||
libgdal1-dev \ | ||
RUN apk add \ | ||
--update alpine-sdk | ||
|
||
RUN apk add openssl \ | ||
ca-certificates \ | ||
libressl2.7-libcrypto | ||
RUN apk add \ | ||
libxml2-dev \ | ||
libxslt-dev \ | ||
xmlsec1 | ||
xmlsec-dev | ||
RUN apk add postgresql-dev \ | ||
libffi-dev\ | ||
jpeg-dev | ||
|
||
RUN apk add --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \ | ||
gdal \ | ||
gdal-dev \ | ||
py-gdal \ | ||
geos \ | ||
geos-dev \ | ||
gcc \ | ||
g++ | ||
|
||
RUN apk add bash | ||
|
||
RUN pip install virtualenv | ||
RUN pip install --upgrade \ | ||
setuptools \ | ||
pip \ | ||
wheel \ | ||
pipenv \ | ||
tox | ||
|
||
# http://gis.stackexchange.com/a/74060 | ||
ENV CPLUS_INCLUDE_PATH /usr/include/gdal | ||
ENV C_INCLUDE_PATH /usr/include/gdal | ||
ENV REQUIREMENTS_FILE base.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,4 +119,3 @@ src/etools/config/settings/custom.py | |
.tox | ||
.pytest_cache | ||
coverage.xml | ||
Pipfile |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,64 @@ | ||
FROM python:3.6.4-jessie | ||
# python:3.6.4-jessie has python 2.7 and 3.6 installed, and packages | ||
# available to install 3.4 | ||
|
||
# Install dependencies | ||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
libcurl4-openssl-dev \ | ||
libjpeg-dev \ | ||
vim \ | ||
ntp \ | ||
libpq-dev | ||
RUN apt-get install -y --no-install-recommends \ | ||
git-core | ||
RUN apt-get install -y --no-install-recommends \ | ||
python3-dev \ | ||
python-software-properties \ | ||
python-setuptools | ||
RUN apt-get install -y --no-install-recommends \ | ||
postgresql-client \ | ||
libpq-dev \ | ||
python-psycopg2 | ||
RUN apt-get install -y --no-install-recommends \ | ||
python-gdal \ | ||
gdal-bin \ | ||
libgdal-dev \ | ||
libgdal1h \ | ||
libgdal1-dev \ | ||
FROM python:3.6.4-alpine as builder | ||
|
||
RUN echo "http://dl-3.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories | ||
RUN apk update | ||
RUN apk add --upgrade apk-tools | ||
|
||
RUN apk add \ | ||
--update alpine-sdk | ||
|
||
RUN apk add openssl \ | ||
ca-certificates \ | ||
libressl2.7-libcrypto | ||
RUN apk add \ | ||
libxml2-dev \ | ||
libxslt-dev \ | ||
xmlsec1 | ||
xmlsec-dev | ||
RUN apk add postgresql-dev \ | ||
libffi-dev\ | ||
jpeg-dev | ||
|
||
RUN apk add --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \ | ||
gdal \ | ||
gdal-dev \ | ||
py-gdal \ | ||
geos \ | ||
geos-dev \ | ||
gcc \ | ||
g++ | ||
|
||
RUN pip install --upgrade \ | ||
setuptools \ | ||
pip \ | ||
wheel | ||
wheel \ | ||
pipenv | ||
|
||
# http://gis.stackexchange.com/a/74060 | ||
ENV CPLUS_INCLUDE_PATH /usr/include/gdal | ||
ENV C_INCLUDE_PATH /usr/include/gdal | ||
ENV REQUIREMENTS_FILE base.txt | ||
WORKDIR /etools/ | ||
ADD Pipfile . | ||
ADD Pipfile.lock . | ||
RUN pipenv install --system --ignore-pipfile --deploy | ||
|
||
ADD src/requirements/*.txt /pip/ | ||
ADD src/requirements/$REQUIREMENTS_FILE /pip/app_requirements.txt | ||
RUN pip install -f /pip -r /pip/app_requirements.txt | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
FROM python:3.6.4-alpine | ||
|
||
RUN echo "http://dl-3.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories | ||
RUN apk update | ||
RUN apk add --upgrade apk-tools | ||
RUN apk add postgresql-client | ||
RUN apk add openssl \ | ||
ca-certificates \ | ||
libressl2.7-libcrypto | ||
RUN apk add geos \ | ||
gdal --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ | ||
|
||
ADD src /code/ | ||
ADD manage.py /code/manage.py | ||
ENV PYTHONPATH /code | ||
ADD manage.py /code/manage.py | ||
|
||
WORKDIR /code/ | ||
|
||
COPY --from=builder /usr/local/lib/python3.6/site-packages /usr/local/lib/python3.6/site-packages | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
ENV PYTHONPATH /code | ||
ENV DJANGO_SETTINGS_MODULE etools.config.settings.production | ||
RUN SECRET_KEY=not-so-secret-key-just-for-collectstatic DISABLE_JWT_LOGIN=1 python manage.py collectstatic --noinput |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,47 @@ | ||
FROM python:3.6.4-jessie | ||
# python:3.6.4-jessie has python 2.7 and 3.6 installed, and packages | ||
# available to install 3.4 | ||
|
||
# Install dependencies | ||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
libcurl4-openssl-dev \ | ||
libjpeg-dev \ | ||
vim \ | ||
ntp \ | ||
libpq-dev | ||
RUN apt-get install -y --no-install-recommends \ | ||
git-core | ||
RUN apt-get install -y --no-install-recommends \ | ||
python3-dev \ | ||
python-software-properties \ | ||
python-setuptools | ||
RUN apt-get install -y --no-install-recommends \ | ||
postgresql-client \ | ||
libpq-dev \ | ||
python-psycopg2 | ||
RUN apt-get install -y --no-install-recommends \ | ||
python-gdal \ | ||
gdal-bin \ | ||
libgdal-dev \ | ||
libgdal1h \ | ||
libgdal1-dev \ | ||
FROM python:3.6.4-alpine | ||
|
||
RUN echo "http://dl-3.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories | ||
RUN apk update | ||
RUN apk add --upgrade apk-tools | ||
|
||
RUN apk add \ | ||
--update alpine-sdk | ||
|
||
RUN apk add openssl \ | ||
ca-certificates \ | ||
libressl2.7-libcrypto | ||
RUN apk add \ | ||
libxml2-dev \ | ||
libxslt-dev \ | ||
xmlsec1 | ||
xmlsec-dev | ||
RUN apk add postgresql-dev \ | ||
libffi-dev\ | ||
jpeg-dev | ||
|
||
RUN apk add --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \ | ||
gdal \ | ||
gdal-dev \ | ||
py-gdal \ | ||
geos \ | ||
geos-dev \ | ||
gcc \ | ||
g++ | ||
|
||
RUN pip install --upgrade \ | ||
setuptools \ | ||
pip \ | ||
wheel | ||
|
||
wheel \ | ||
pipenv | ||
|
||
# http://gis.stackexchange.com/a/74060 | ||
ENV CPLUS_INCLUDE_PATH /usr/include/gdal | ||
ENV C_INCLUDE_PATH /usr/include/gdal | ||
ENV REQUIREMENTS_FILE=test.txt | ||
|
||
ADD src/requirements/*.txt /pip/ | ||
ADD src/requirements/$REQUIREMENTS_FILE /pip/app_requirements.txt | ||
RUN pip install -f /pip -r /pip/app_requirements.txt | ||
WORKDIR /etools/ | ||
ADD Pipfile . | ||
ADD Pipfile.lock . | ||
RUN pipenv install --dev --system --ignore-pipfile | ||
RUN apk add bash | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
ENV PYTHONPATH /code | ||
ENV DJANGO_SETTINGS_MODULE etools.config.settings.local | ||
|
||
VOLUME "./:/code/" | ||
WORKDIR /code/ | ||
|
||
ENV DJANGO_SETTINGS_MODULE etools.config.settings.local |
Oops, something went wrong.