Skip to content

Commit 99fa187

Browse files
committedDec 26, 2018
new docker based on pywps4.2.1 and travis
1 parent c58bf75 commit 99fa187

File tree

12 files changed

+252
-139
lines changed

12 files changed

+252
-139
lines changed
 

‎.travis.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
language: python
2+
3+
dist: xenial
4+
25
python:
36
- "2.7"
47
- "3.4"
@@ -10,7 +13,7 @@ git:
1013
install:
1114
- sudo apt-get update -qq
1215
- sudo apt-get install -qq gdal-bin libgdal-dev libgdal1h libgdal1-dev libgeos-dev python-dev python3-dev
13-
- pip install GDAL==1.10.0 --global-option=build_ext --global-option="-I/usr/include/gdal"
16+
- pip install GDAL==1.11.3 --global-option=build_ext --global-option="-I/usr/include/gdal"
1417
- pip install -r requirements.txt
1518

1619
before_script:

‎README.rst

+157-48
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,132 @@
1-
PyWPS demo with docker support
2-
==============================
3-
Clone pywps-flask, install libraries, build docker image (due to GDAL compiling lasts quite long)::
1+
============
2+
Installation
3+
============
44

5-
$ pip3 install -r requirements.txt
6-
$ cd pywps-flask/docker/alpine/flask
7-
$ docker build -t pywps_container .
5+
The app depends on PyWPS and several other libraries that are listed in
6+
``requirements.txt``. It is advisable to run it using a python virtualenv to prevent package instalation problems
87

8+
$ virtualenv -p python3 pywps_flask_env
9+
$ cd pywps_flask_dir
10+
$ . bin/activate
11+
$ git clone https://github.com/geopython/pywps-flask
12+
$ cd pywps-flask
13+
$ pip3 install -r requirements.txt
914

10-
Clone pywps and OWSLib::
1115

12-
$ git clone https://github.com/lazaa32/pywps.git
13-
$ git clone https://github.com/lazaa32/OWSLib.git
16+
If python virtualenv is not an option:
1417

15-
Set PYTHONPATH::
18+
$ git clone https://github.com/geopython/pywps-flask
19+
$ cd pywps-flask
20+
$ pip3 install -r requirements.txt
1621

17-
$ export PYTHONPATH=$PYTHONPATH:$PWD/OWSLib:$PWD/pywps
1822

19-
Run server::
2023

21-
python3 demo.py
24+
For Debian based systems you will need to install GDAL with::
2225

26+
$ sudo apt-get install python3-gdal
2327

24-
PyWPS example service
25-
========================
2628

27-
This is a simple example service written using PyWPS. It has been tested with
28-
QGIS 1.8.
29+
When using only using `requirement.txt`, the `pywps-flask` will run for the directory that was pulled from github, for a system wise installation is it advisable to use `setup.py`
2930

31+
$ git clone https://github.com/geopython/pywps-flask
32+
$ cd pywps-flask
33+
$ python3 setup.py install
3034

31-
Installation
32-
------------
33-
The app depends on PyWPS and several other libraries that are listed in
34-
``requirements.txt``. You can install them with pip::
3535

36-
$ pip install -r requirements.txt
36+
=======
37+
Running
38+
=======
3739

38-
For Debian based systems you will need to install GDAL with::
40+
Simply run the python file::
3941

40-
$ sudo apt-get install python-gdal
42+
$ python3 demo.py -a
4143

42-
For Windows systems install you need to install Shapely and GDAL by using Python Wheels.
43-
If you have Shapely already installed you might have to uninstall it and installed as a Wheel for it to work::
44+
The flag `-a` will bind to the ip range `0.0.0.0` and is normally the safest option access to `pypwps-flask`
4445

45-
Download the corresponding wheel for Shapely: http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely
46+
The `-d` option will run pywps-flask as daemon and to stop it is necessary to determine the PID and kill it, one trick is to use fuser to determine PID, and then use it to kill the process
4647

47-
Download the corresponding wheel for GDAL: http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal
48+
$ fuser tcp/5000
49+
$ kill -15 <PID RETURNED PREVIOUSLY>
4850

49-
$ pip install wheel
5051

51-
$ pip install Shapely?x.x.x?cpxx?none?win_xxx.whl
5252

53-
$ pip install GDAL?x.x.x?cpxx?none?win_xxx.whl
53+
==============
54+
Docker images
55+
==============
5456

57+
The docker folder contains 2 subfolders, each subfolder contains a differente pywps implementation.
5558

56-
Running
57-
-------
58-
Simply run the python file::
59+
Folder ``flask`` has the default pywps-flask implementation using only Flask while folder ``nginx`` implements pywps using Nginx and Green unicorn as WSGI server. While folder ``ubuntu`` has the same images but using phusion image (ubuntu 18.04)
60+
5961

60-
$ python demo.py
6162

63+
Flask-Alpine (basic)
64+
--------------------
6265

63-
Docker
64-
------
65-
The docker folder contains 2 subfolders, each subfolder contains a differente pywps implementation. Folder ``flask``
66-
has the default pywps-flask implementation using only Flask while folder ``nginx`` implements pywps using Nginx and Green unicorn as WSGI server.
66+
Basic pywps image is based on Alpine 3.8 and will run the native Flask service, this is not apropriate for production. The docker file can be found in: ``docker/alpine/flask/Dockerfile``
6767

6868

69-
Docker-flask
70-
------------
7169

7270
To build the image (inside the folder with the Dockerfile)::
7371

74-
$ docker build -t pywps4-demo:latest .
72+
$ docker build -t pywps/flask-alpine .
7573

7674
And to run it::
7775

78-
$ docker run -p 5000:5000 pywps4-demo:latest
76+
$ docker run -p 5000:5000 pywps/flask-alpine:latest
7977

8078

8179
Pywps will be available in the following URL::
8280

8381
$ http://localhost:5000
8482

8583

86-
Docker-nginx
84+
85+
Gunicorn-Alpine (production)
86+
---------------------------
87+
88+
This image implements the previous ``flask-alpine image`` (you need to build it first, or it will be automatically pulled from dockerhub) but wrapping flask in a WSGI server (gunicorn) where each worker runs a an app. This image allows for the following environment variables::
89+
90+
* GU_WORKERS - Numer or workers. Gunicorn uses a set of workers to run pywps (normally ``workers = (2 * cpu) + 1``). (default: 5)
91+
* GU_PORT - Port running Gunicorn (default:8081)
92+
93+
94+
95+
Gunicorn-Alpine is locate in folder ``docker/alpine/gunicorn/Dockerfile``
96+
97+
This image can already be implemented in production but it is advisable to use Nginx for HTTP load balance and Gunicorn as WSGI server (see below)
98+
99+
To build the image (inside the folder with the Dockerfile)::
100+
101+
$ docker build -t pywps/gunicorn-alpine:latest .
102+
103+
104+
And to run it::
105+
$ docker run -p 8081:8081 -it pywps/gunicorn-alpine:latest
106+
107+
or::
108+
$ docker run -e GU_WORKERS=10 -e GU_PORT=8082 -p 8082:8082 -it pywps/gunicorn-alpine:latest
109+
110+
Pywps will be available in the following URL::
111+
112+
$ http://localhost:8082
113+
114+
115+
Nginx-Alpine
87116
------------
88117

89-
To build the image (inside the folder with the Dockerfile)::
118+
This is the complete stack intented for production, to have a stack we require to use ``docker-compose``
119+
to build two images: ``pywps/gunicorn-alpine:latest`` and ``pywps/nginx-alpine:latest``
90120

91-
$ docker build -t pywps4-demo .
121+
Those images will be pulled from dockerhub, but they can compiled locally by building Flask-Alpine, Gunicron-Alpine and Nginx-Alpine, in this case only showing for nginx
92122

93123

94-
Gunicorn uses a set of workers to run pywps (normally ``workers = (2 * cpu) + 1``), the default value used was 5 but it can be overwritten by setting the env flag GU_WORKERS::
124+
$ cd docker/alpine/nginx/Dockerfile
125+
$ docker build -t pywps/nginx-alpine:latest .
95126

127+
Then the stack can be started using docker compose::
96128

97-
$ docker run -e GU_WORKERS=10 -p 80:80 -it pywps4-demo:nginx
129+
$ docker-compose up
98130

99131

100132
In this case pywps (only the WPS) will be avalable on::
@@ -103,8 +135,85 @@ In this case pywps (only the WPS) will be avalable on::
103135
http://localhost
104136

105137

138+
Flask-Ubuntu (basic)
139+
--------------------
140+
141+
The same as ``Flask-Ubuntu`` but using phusion image (ubuntu 18.04)
142+
143+
144+
$ cd docker/ubuntu/flask/Dockerfile
145+
$ docker build -t pywps/flask-ubuntu:latest .
146+
147+
And to run it::
148+
149+
$ docker run -p 5000:5000 pywps/flask-ubuntu
150+
151+
152+
Nginx-Ubuntu (production)
153+
-------------------------
154+
155+
This image is based on ``Flask-Ubuntu`` and will require it (either build locally or pull from dockerhub). This image has Nginx and Gunicorn totally integrated as services in a docker image
156+
157+
158+
$ cd docker/ubuntu/nginx/Dockerfile
159+
$ docker build -t pywps/nginx-ubuntu
160+
161+
And to run it::
162+
163+
$ docker run -p 80:80 pywps/nginx-ubuntu
164+
165+
It is possible to set the number of Gunicorn workers::
166+
167+
* GU_WORKERS - Numer or workers. (default: 5)
168+
169+
e.g::
170+
171+
$ docker run -e GU_WORKERS=10 -p 80:80 pywps/nginx-ubuntu
172+
173+
174+
175+
Volumes
176+
-------
177+
178+
179+
Named volumes allow for container content to be available in the host system. The most important folders in pywps containers are:
180+
181+
* /pywps-flask/logs
182+
* /pywps-flask/outputs
183+
* /pywps-flask/processes
184+
185+
And file:
186+
* /pywps-flask/pywps.cfg
187+
188+
Named volumes need to be created prior to ``docker run``
189+
190+
$ docker volume create pywps_logs
191+
$ docker volume create pywps_outputs
192+
$ docker volume create pywps_processes
193+
194+
To check the path on the host to volume and other information::
195+
196+
197+
$ docker volume ls pywps_processes
198+
199+
200+
To run a docker will all the volumes available in the host::
201+
202+
$ docker run -p 5000:5000 -v pywps_logs:/pywps-flask/pywps_logs \
203+
-v pywps_outputs:/pywps-flask/pywps_outputs \
204+
-v pywps_processes:/pywps-flask/pywps_processes \
205+
-v pywps_cfg:/pywps-flask/pywps.cfg pywps/flask-alpine:latest
206+
207+
208+
209+
210+
211+
212+
213+
106214

107215

216+
108217

109218

110219

‎docker/alpine/flask/Dockerfile

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
FROM alpine:3.6
2-
MAINTAINER Jorge S. Mendes de Jesus <jorge.dejesus@geocat.net>
1+
FROM alpine:3.8
2+
MAINTAINER Jorge S. Mendes de Jesus <jorge.dejesus@protonmail.com>
33

4-
ARG GDAL_VERSION=2.3.2
4+
ARG GDAL_VERSION=2.4.0
55
ARG XERCES_VERSION=3.2.2
66
ARG PROCESSOR_N=4
7+
ARG FLASK_GIT=https://github.com/jorgejesus/pywps-flask.git
8+
ARG FLASK_BRANCH=pywps_4.2
79

810
RUN apk update && apk add --no-cache \
911
git \
@@ -27,35 +29,34 @@ RUN apk add --no-cache \
2729
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
2830
geos \
2931
geos-dev
32+
3033

3134
#Compiling Xerces
32-
RUN wget http://www.apache.org/dist/xerces/c/3/sources/xerces-c-${XERCES_VERSION}.tar.gz -O /tmp/xerces-c-${XERCES_VERSION}.tar.gz && \
33-
tar xvf /tmp/xerces-c-${XERCES_VERSION}.tar.gz -C /tmp && \
34-
cd /tmp/xerces-c-${XERCES_VERSION} && \
35+
RUN wget http://www.apache.org/dist/xerces/c/3/sources/xerces-c-$XERCES_VERSION.tar.gz -O /tmp/xerces-c-$XERCES_VERSION.tar.gz && \
36+
tar xvf /tmp/xerces-c-$XERCES_VERSION.tar.gz -C /tmp && \
37+
cd /tmp/xerces-c-$XERCES_VERSION && \
3538
LDFLAGS="-s" ./configure --prefix=/usr/local/src/xerces && \
3639
make -j $PROCESSOR_N install
3740

3841
# Install GDAL
39-
RUN wget http://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION}.tar.gz -O /tmp/gdal.tar.gz && \
42+
RUN wget http://download.osgeo.org/gdal/$GDAL_VERSION/gdal-$GDAL_VERSION.tar.gz -O /tmp/gdal.tar.gz && \
4043
tar xzf /tmp/gdal.tar.gz -C /tmp && \
41-
cd /tmp/gdal-${GDAL_VERSION} && \
44+
cd /tmp/gdal-$GDAL_VERSION && \
4245
LDFLAGS="-s" ./configure --with-expat=yes --with-xerces=/opt/xerces --with-geos=yes \
43-
&& make -j ${PROCESSOR_N} && make install
46+
&& make -j $PROCESSOR_N && make install
4447

45-
RUN cd /tmp/gdal-${GDAL_VERSION}/swig/python \
48+
RUN cd /tmp/gdal-$GDAL_VERSION/swig/python \
4649
&& python3 setup.py install
4750

4851
RUN rm -rf /var/cache/apk/*
4952

50-
RUN git clone https://github.com/geopython/pywps-flask.git
51-
53+
RUN git clone $FLASK_GIT -b $FLASK_BRANCH --single-branch
5254
WORKDIR /pywps-flask
5355
RUN pip3 install -r requirements.txt
54-
5556

5657
ENTRYPOINT ["/usr/bin/python3", "demo.py","-a"]
5758

58-
#docker build -t pywps-flask .
59-
#docker run -p 5000:5000 pywps-flask
59+
#docker build -t pywps/flask-alpine .
60+
#docker run -p 5000:5000 pywps/flask-alpine:latest
6061
#http://localhost:5000/wps?request=GetCapabilities&service=WPS
6162
#http://localhost:5000/wps?request=DescribeProcess&service=WPS&identifier=all&version=1.0.0

‎docker/alpine/gunicorn/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
FROM pywps/flask-alpine:3.6
2-
MAINTAINER Jorge Samuel Mendes de Jesus <jorge.dejesus@geocat.net>
1+
FROM pywps/flask-alpine:latest
2+
MAINTAINER Jorge Samuel Mendes de Jesus <jorge.dejesus@protonmail.com>
33

44
#For Gunicorn
55
ARG GU_WORKERS=5
@@ -17,7 +17,7 @@ RUN ln -s /pywps-flask/wsgi/pywps.wsgi /pywps-flask/wsgi/pywps_app.py
1717

1818
ENTRYPOINT ["/run_all.sh"]
1919

20-
#Build: docker build -t pywps4:gunicorn .
21-
#Usage: docker run -p 8081:8081 -it pywps4:nginx
22-
#Usage w/ 10 workers: docker run -e GU_WORKERS=10 -e GU_PORT=8082 -p 8082:8082 -it pywps4:gunicorn
20+
#Build: docker build -t pywps/gunicorn-alpine:latest .
21+
#Usage: docker run -p 8081:8081 -it pywps/gunicorn-alpine:latest
22+
#Usage w/ 10 workers: docker run -e GU_WORKERS=10 -e GU_PORT=8082 -p 8082:8082 -it pywps/gunicorn-alpine:latest
2323

‎docker/alpine/nginx/Dockerfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
FROM nginx:1.13.7-alpine
1+
FROM nginx:1.15.7-alpine
22
MAINTAINER Jorge Samuel Mendes de Jesus <jorge.dejesus@geocat.net>
33

44
RUN rm /etc/nginx/conf.d/default.conf
55
COPY pywps.conf /etc/nginx/conf.d/pywps.conf
66

77

8-
#Build: docker build -t pywps4:nginx .
9-
#Usage: docker run -p 80:80 -it pywps4:nginx
8+
#Build: docker build -t pywps/nginx-alpine:latest .
9+
#Usage: docker-compose up
10+
#Usage: docker run -p 80:80 -it pywps/nginx-alpine:latest

‎docker/alpine/nginx/docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ version: '3.1'
22

33
services:
44
pywps:
5-
image: pywps/gunicorn-alpine:3.6
5+
image: pywps/gunicorn-alpine:latest
66
nginx:
7-
image: pywps/nginx-alpine:3.6
7+
image: pywps/nginx-alpine:latest
88
build: .
99
depends_on:
1010
- pywps

‎docker/isolation/Dockerfile

+23-21
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
FROM alpine:3.6
2-
MAINTAINER Jorge S. Mendes de Jesus <jorge.dejesus@geocat.net>
1+
FROM alpine:3.8
2+
MAINTAINER Jorge S. Mendes de Jesus <jorge.dejesus@protonmail.com>
33

44
ARG GDAL_VERSION=2.3.2
55
ARG XERCES_VERSION=3.2.2
66
ARG PROCESSOR_N=4
7+
ARG FLASK_GIT=https://github.com/jorgejesus/pywps-flask.git
8+
ARG FLASK_BRANCH=pywps_4.2
79

810
RUN apk update && apk add --no-cache \
911
git \
@@ -17,46 +19,46 @@ RUN apk update && apk add --no-cache \
1719
libxslt-dev \
1820
linux-headers \
1921
expat \
20-
expat-dev
22+
expat-dev \
23+
g++ \
24+
libstdc++ \
25+
make \
26+
swig
2127

2228

23-
RUN apk --update --no-cache add g++ libstdc++ make swig
24-
25-
# Xerces
26-
RUN wget http://www.apache.org/dist/xerces/c/3/sources/xerces-c-${XERCES_VERSION}.tar.gz -O /tmp/xerces-c-${XERCES_VERSION}.tar.gz && \
27-
tar xvf /tmp/xerces-c-${XERCES_VERSION}.tar.gz -C /tmp && \
28-
cd /tmp/xerces-c-${XERCES_VERSION} && \
29-
./configure --prefix=/opt/xerces && \
30-
make -j $PROCESSOR_N && \
31-
make install
32-
33-
# Geos
3429
RUN apk add --no-cache \
3530
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
3631
geos \
3732
geos-dev
3833

34+
#Compiling Xerces
35+
RUN wget http://www.apache.org/dist/xerces/c/3/sources/xerces-c-$XERCES_VERSION.tar.gz -O /tmp/xerces-c-$XERCES_VERSION.tar.gz && \
36+
tar xvf /tmp/xerces-c-$XERCES_VERSION.tar.gz -C /tmp && \
37+
cd /tmp/xerces-c-$XERCES_VERSION && \
38+
LDFLAGS="-s" ./configure --prefix=/usr/local/src/xerces && \
39+
make -j $PROCESSOR_N install
40+
41+
3942
# Install GDAL
40-
RUN wget http://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION}.tar.gz -O /tmp/gdal.tar.gz && \
43+
RUN wget http://download.osgeo.org/gdal/$GDAL_VERSION/gdal-$GDAL_VERSION.tar.gz -O /tmp/gdal.tar.gz && \
4144
tar xzf /tmp/gdal.tar.gz -C /tmp && \
42-
cd /tmp/gdal-${GDAL_VERSION} && \
45+
cd /tmp/gdal-$GDAL_VERSION && \
4346
CFLAGS="-g -Wall" LDFLAGS="-s" ./configure --with-expat=yes --with-xerces=/opt/xerces --with-geos=yes \
4447
&& make -j $PROCESSOR_N && make install
4548

46-
RUN cd /tmp/gdal-${GDAL_VERSION}/swig/python \
49+
RUN cd /tmp/gdal-$GDAL_VERSION/swig/python \
4750
&& python3 setup.py build \
4851
&& python3 setup.py install
4952

50-
RUN git clone https://github.com/geopython/pywps-flask.git
51-
53+
RUN git clone $FLASK_GIT -b $FLASK_BRANCH --single-branch
5254
WORKDIR /pywps-flask
5355
RUN pip3 install -r requirements.txt
5456

5557

5658
EXPOSE 5000
5759
ENTRYPOINT ["/usr/bin/python3", "demo.py","-a"]
5860

59-
#docker build -t pywps-flask .
60-
#docker run -p 5000:5000 pywps-flask
61+
#docker build -t pywps .
62+
#docker run -p 5000:5000 pywps
6163
#http://localhost:5000/wps?request=GetCapabilities&service=WPS
6264
#http://localhost:5000/wps?request=DescribeProcess&service=WPS&identifier=all&version=1.0.0

‎docker/ubuntu/flask/Dockerfile

+37-37
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
#based on https://hub.docker.com/r/geographica/gdal2/~/dockerfile/
2-
FROM phusion/baseimage:0.9.22
3-
MAINTAINER Jorge S. Mendes de Jesus <jorge.dejesus@geocat.net>
2+
#Using a fat docker since other images like nginx-gunicorn will just incorporate extra services
3+
FROM phusion/baseimage:0.11
4+
MAINTAINER Jorge S. Mendes de Jesus <jorge.dejesus@protomail.com>
45

56
ARG ROOTDIR=/usr/local/
6-
ARG GDAL_VERSION=2.3.2
7+
ARG GDAL_VERSION=2.4.0
78
ARG PROCESSOR_N=8
9+
ARG FLASK_GIT=https://github.com/jorgejesus/pywps-flask.git
10+
ARG FLASK_BRANCH=pywps_4.2
811

912
WORKDIR $ROOTDIR/
1013

14+
RUN apt-get update -y && install_clean \
15+
software-properties-common \
16+
build-essential \
17+
python3-dev \
18+
python3-numpy \
19+
python3-lxml \
20+
python3-lxml \
21+
python3-pip \
22+
python3-wheel \
23+
python3-setuptools \
24+
libspatialite-dev \
25+
sqlite3 \
26+
libpq-dev \
27+
libxml2-dev \
28+
libcurl4-gnutls-dev \
29+
libproj-dev \
30+
libxml2-dev \
31+
libxslt-dev \
32+
libgeos-dev \
33+
libxerces-c-dev \
34+
git \
35+
cmake
1136

12-
RUN apt-get update -y && apt-get install -y \
13-
software-properties-common \
14-
python-software-properties \
15-
python3-software-properties \
16-
build-essential \
17-
python-dev \
18-
python3-dev \
19-
python-numpy \
20-
python3-numpy \
21-
python3-lxml \
22-
python3-pip \
23-
libspatialite-dev \
24-
sqlite3 \
25-
libpq-dev \
26-
libxml2-dev \
27-
libcurl4-gnutls-dev \
28-
libproj-dev \
29-
libxml2-dev \
30-
libxslt-dev \
31-
libgeos-dev \
32-
libspatialite-dev \
33-
libxerces-c-dev \
34-
libexpat1-dev \
35-
git \
36-
bash-completion \
37-
cmake
3837

39-
ADD http://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION}.tar.gz $ROOTDIR/src/
38+
ADD http://download.osgeo.org/gdal/$GDAL_VERSION/gdal-$GDAL_VERSION.tar.gz $ROOTDIR/src/
4039

41-
RUN cd src/ && tar -xvf gdal-${GDAL_VERSION}.tar.gz && cd gdal-${GDAL_VERSION} \
40+
RUN cd src/ && tar -xvf gdal-$GDAL_VERSION.tar.gz && cd gdal-$GDAL_VERSION \
4241
&& LDFLAGS="-s" ./configure --with-python --with-geos --with-spatialite --with-pg --with-curl --with-xerces --with-expat \
43-
&& make -j ${PROCESSOR_N} && make install && ldconfig \
44-
&& cd $ROOTDIR && cd src/gdal-${GDAL_VERSION}/swig/python \
42+
&& make -j $PROCESSOR_N && make install && ldconfig \
43+
&& cd $ROOTDIR && cd src/gdal-$GDAL_VERSION/swig/python \
4544
&& python3 setup.py build \
4645
&& python3 setup.py install \
4746
&& cd $ROOTDIR && rm -Rf src/gdal*
47+
4848

4949
WORKDIR /
50-
RUN git clone https://github.com/geopython/pywps-flask.git
50+
RUN git clone $FLASK_GIT -b $FLASK_BRANCH --single-branch
5151

5252
WORKDIR /pywps-flask
5353
RUN pip3 install -r requirements.txt
@@ -56,11 +56,11 @@ RUN mkdir /etc/service/pywps4
5656
COPY pywps4_service.sh /etc/service/pywps4/run
5757
RUN chmod +x /etc/service/pywps4/run
5858

59+
5960
EXPOSE 5000
60-
ENTRYPOINT ["/usr/bin/python3", "demo.py","-a"]
6161

62-
#docker build -t pywps-flask .
63-
#docker run -p 5000:5000 pywps-flask
62+
#docker build -t pywps/flask-ubuntu:latest .
63+
#docker run -p 5000:5000 pywps/flask-ubuntu
6464
#http://localhost:5000/wps?request=GetCapabilities&service=WPS
6565
#http://localhost:5000/wps?request=DescribeProcess&service=WPS&identifier=all&version=1.0.0
6666

‎docker/ubuntu/nginx-gunicorn/Dockerfile ‎docker/ubuntu/nginx/Dockerfile

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#based on https://hub.docker.com/r/geographica/gdal2/~/dockerfile/
2-
FROM pywps/flask-ubuntu:16.0.4
2+
FROM pywps/flask-ubuntu:latest
33
MAINTAINER Jorge S. Mendes de Jesus <jorge.dejesus@geocat.net>
44

55
#For Gunicorn
@@ -17,7 +17,6 @@ RUN pip3 install gunicorn
1717
RUN ln -s /pywps-flask/wsgi/pywps.wsgi /pywps-flask/wsgi/pywps_app.py
1818

1919

20-
2120
COPY pywps4_service.sh /etc/service/pywps4/run
2221
RUN chmod +x /etc/service/pywps4/run
2322

@@ -26,12 +25,10 @@ COPY nginx_service.sh /etc/service/nginx/run
2625
RUN chmod +x /etc/service/nginx/run
2726

2827
EXPOSE 80
29-
30-
#EXPOSE 5000
31-
#ENTRYPOINT ["/usr/bin/python3", "demo.py","-a"]
3228

33-
#docker build -t pywps-flask .
34-
#docker run -p 5000:5000 pywps-flask
29+
30+
#docker build -t pywps/nginx-ubuntu .
31+
#docker run -p 80:80 pywps/nginx-ubuntu
3532
#http://localhost:5000/wps?request=GetCapabilities&service=WPS
3633
#http://localhost:5000/wps?request=DescribeProcess&service=WPS&identifier=all&version=1.0.0
3734

File renamed without changes.

0 commit comments

Comments
 (0)
Please sign in to comment.