From 0b7cb752515382e78eb9d112499e33bf2fcb3c50 Mon Sep 17 00:00:00 2001 From: Just van den Broecke Date: Tue, 6 Nov 2018 23:10:57 +0100 Subject: [PATCH] #138 pin all Python required packages and Docker Python-Alpine version --- Dockerfile | 2 +- docker/scripts/install.sh | 16 +++++----------- docker/scripts/requirements.txt | 5 +++++ requirements-dev.txt | 2 +- requirements.txt | 4 ++-- 5 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 docker/scripts/requirements.txt diff --git a/Dockerfile b/Dockerfile index bd04bef0..61aa6a74 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:2.7.13-alpine +FROM python:2.7.15-alpine3.8 # Thanks to http://www.sandtable.com/reduce-docker-image-sizes-using-alpine # FROM debian:jessie diff --git a/docker/scripts/install.sh b/docker/scripts/install.sh index c66f34fa..17ce1b26 100755 --- a/docker/scripts/install.sh +++ b/docker/scripts/install.sh @@ -5,18 +5,12 @@ virtualenv venv && cd /venv . bin/activate # GHC Source was added in Dockerfile, install -cd /GeoHealthCheck -pip install Paver -pip install sphinx - -# For PostGIS support -pip install psycopg2 - -# For WSGI server -# NB we use async workers as some Probes may take a long time +# NB we use gunicorn/eventlet async workers as some Probes may take a long time # e.g. fetching Metadata (Caps) and testing all layers -pip install -I eventlet -pip install -I gunicorn +# Install Python packages for installation and setup +pip install -I -r /GeoHealthCheck/docker/scripts/requirements.txt + +cd /GeoHealthCheck # Sets up GHC itself paver setup diff --git a/docker/scripts/requirements.txt b/docker/scripts/requirements.txt new file mode 100644 index 00000000..d7127e7d --- /dev/null +++ b/docker/scripts/requirements.txt @@ -0,0 +1,5 @@ +Paver==1.3.4 +Sphinx==1.8.1 +psycopg2==2.7.5 +eventlet==0.24.1 +gunicorn==19.9.0 diff --git a/requirements-dev.txt b/requirements-dev.txt index 5eefed40..bd869515 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,3 +1,3 @@ flake8 -Paver +Paver==1.3.4 pylint diff --git a/requirements.txt b/requirements.txt index 3b32fcaf..b88a4cd8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,8 +4,8 @@ Flask-Login==0.2.11 Flask-Migrate==2.0.3 Flask-Script==2.0.5 Flask-SQLAlchemy==2.1 -OWSLib -Sphinx +OWSLib==0.17.0 +Sphinx==1.8.1 requests>=2.20.0 WTForms==2.1 APScheduler==3.5.1