diff --git a/.travis.yml b/.travis.yml index bbaa199..6854be5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,7 @@ language: python + +dist: xenial + python: - "2.7" - "3.4" @@ -9,8 +12,8 @@ git: install: - sudo apt-get update -qq - - sudo apt-get install -qq gdal-bin libgdal-dev libgdal1h libgdal1-dev libgeos-dev python-dev python3-dev - - pip install GDAL==1.10.0 --global-option=build_ext --global-option="-I/usr/include/gdal" + - sudo apt-get install -qq gdal-bin libgdal1i libgdal1-dev libgdal-dev libgeos-dev python-dev python3-dev + - pip install GDAL==1.11.1 --global-option=build_ext --global-option="-I/usr/include/gdal" - pip install -r requirements.txt before_script: diff --git a/README.rst b/README.rst index 1631da3..74be39f 100644 --- a/README.rst +++ b/README.rst @@ -1,81 +1,79 @@ -PyWPS demo with docker support -============================== -Clone pywps-flask, install libraries, build docker image (due to GDAL compiling lasts quite long):: +============ +Installation +============ + +The app depends on PyWPS and several other libraries that are listed in +``requirements.txt``. It is advisable to run it using a python virtualenv to prevent package instalation problems:: + $ virtualenv -p python3 pywps_flask_env + $ cd pywps_flask_dir + $ . bin/activate + $ git clone https://github.com/geopython/pywps-flask + $ cd pywps-flask $ pip3 install -r requirements.txt - $ cd pywps-flask/docker/alpine/flask - $ docker build -t pywps_container . -Clone pywps and OWSLib:: +If python virtualenv is not an option:: - $ git clone https://github.com/lazaa32/pywps.git - $ git clone https://github.com/lazaa32/OWSLib.git + $ git clone https://github.com/geopython/pywps-flask + $ cd pywps-flask + $ pip3 install -r requirements.txt -Set PYTHONPATH:: - $ export PYTHONPATH=$PYTHONPATH:$PWD/OWSLib:$PWD/pywps -Run server:: +For Debian based systems you will need to install GDAL with:: - python3 demo.py + $ sudo apt-get install python3-gdal -PyWPS example service -======================== +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`:: -This is a simple example service written using PyWPS. It has been tested with -QGIS 1.8. + $ git clone https://github.com/geopython/pywps-flask + $ cd pywps-flask + $ python3 setup.py install -Installation ------------- -The app depends on PyWPS and several other libraries that are listed in -``requirements.txt``. You can install them with pip:: - - $ pip install -r requirements.txt +======= +Running +======= -For Debian based systems you will need to install GDAL with:: +Simply run the python file:: - $ sudo apt-get install python-gdal + $ python3 demo.py -a -For Windows systems install you need to install Shapely and GDAL by using Python Wheels. -If you have Shapely already installed you might have to uninstall it and installed as a Wheel for it to work:: +The flag `-a` will bind to the ip range `0.0.0.0` and is normally the safest option access to `pypwps-flask` - Download the corresponding wheel for Shapely: http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely +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:: - Download the corresponding wheel for GDAL: http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal + $ fuser tcp/5000 + $ kill -15 - $ pip install wheel - $ pip install Shapely?x.x.x?cpxx?none?win_xxx.whl - $ pip install GDAL?x.x.x?cpxx?none?win_xxx.whl +============== +Docker images +============== +The docker folder contains 2 subfolders, each subfolder contains a differente pywps implementation. -Running -------- -Simply run the python file:: +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) + - $ python demo.py +Flask-Alpine (basic) +-------------------- -Docker ------- -The docker folder contains 2 subfolders, each subfolder contains a differente pywps implementation. Folder ``flask`` -has the default pywps-flask implementation using only Flask while folder ``nginx`` implements pywps using Nginx and Green unicorn as WSGI server. +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`` -Docker-flask ------------- To build the image (inside the folder with the Dockerfile):: - $ docker build -t pywps4-demo:latest . + $ docker build -t pywps/flask-alpine . And to run it:: - $ docker run -p 5000:5000 pywps4-demo:latest + $ docker run -p 5000:5000 pywps/flask-alpine:latest Pywps will be available in the following URL:: @@ -83,18 +81,54 @@ Pywps will be available in the following URL:: $ http://localhost:5000 -Docker-nginx + +Gunicorn-Alpine (production) +---------------------------- + +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: + + - GU_WORKERS - Numer or workers. Gunicorn uses a set of workers to run pywps (normally ``workers = (2 * cpu) + 1``). (default: 5) + - GU_PORT - Port running Gunicorn (default:8081) + + + +Gunicorn-Alpine is locate in folder ``docker/alpine/gunicorn/Dockerfile`` + +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) + +To build the image (inside the folder with the Dockerfile):: + + $ docker build -t pywps/gunicorn-alpine:latest . + + +And to run it:: + + $ docker run -p 8081:8081 -it pywps/gunicorn-alpine:latest + +or:: + + $ docker run -e GU_WORKERS=10 -e GU_PORT=8082 -p 8082:8082 -it pywps/gunicorn-alpine:latest + +Pywps will be available at the following URL:: + + $ http://localhost:8082 + + +Nginx-Alpine ------------ -To build the image (inside the folder with the Dockerfile):: +This is the complete stack intented for production, to have a stack we require to use ``docker-compose`` +to build two images: ``pywps/gunicorn-alpine:latest`` and ``pywps/nginx-alpine:latest`` - $ docker build -t pywps4-demo . +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:: -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:: + $ cd docker/alpine/nginx/Dockerfile + $ docker build -t pywps/nginx-alpine:latest . +Then the stack can be started using docker compose:: - $ docker run -e GU_WORKERS=10 -p 80:80 -it pywps4-demo:nginx + $ docker-compose up In this case pywps (only the WPS) will be avalable on:: @@ -103,11 +137,77 @@ In this case pywps (only the WPS) will be avalable on:: http://localhost +Flask-Ubuntu (basic) +-------------------- + +The same as ``Flask-Ubuntu`` but using phusion image (ubuntu 18.04):: + + + $ cd docker/ubuntu/flask + $ docker build -t pywps/flask-ubuntu:latest . + +And to run it:: + + $ docker run -p 5000:5000 pywps/flask-ubuntu + + +Nginx-Ubuntu (production) +------------------------- + +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:: + + + $ cd docker/ubuntu/nginx + $ docker build -t pywps/nginx-ubuntu . + +And to run it:: + + $ docker run -p 80:80 pywps/nginx-ubuntu + +It is possible to set the number of Gunicorn workers: + +* GU_WORKERS - Numer or workers. (default: 5) + +e.g:: + + $ docker run -e GU_WORKERS=10 -p 80:80 pywps/nginx-ubuntu + + + +Volumes +------- + + +Named volumes allow for container content to be available in the host system. The most important folders in pywps containers are: + +* /pywps-flask/logs +* /pywps-flask/outputs +* /pywps-flask/processes + +And file: +* /pywps-flask/pywps.cfg + +Named volumes need to be created prior to ``docker run``:: + + $ docker volume create pywps_logs + $ docker volume create pywps_outputs + $ docker volume create pywps_processes + +To check the path on the host to volume and other information:: + + $ docker volume ls pywps_processes +To run a docker will all the volumes available in the host:: + $ docker run -p 5000:5000 -v pywps_logs:/pywps-flask/pywps_logs \ + -v pywps_outputs:/pywps-flask/pywps_outputs \ + -v pywps_processes:/pywps-flask/pywps_processes \ + -v pywps_cfg:/pywps-flask/pywps.cfg pywps/flask-alpine:latest +THE END +======= diff --git a/VERSION.txt b/VERSION.txt index fcdb2e1..fae6e3d 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -4.0.0 +4.2.1 diff --git a/docker/alpine/flask/Dockerfile b/docker/alpine/flask/Dockerfile index 48ab713..a14d49f 100644 --- a/docker/alpine/flask/Dockerfile +++ b/docker/alpine/flask/Dockerfile @@ -1,9 +1,11 @@ -FROM alpine:3.6 -MAINTAINER Jorge S. Mendes de Jesus +FROM alpine:3.8 +MAINTAINER Jorge S. Mendes de Jesus -ARG GDAL_VERSION=2.3.2 +ARG GDAL_VERSION=2.4.0 ARG XERCES_VERSION=3.2.2 ARG PROCESSOR_N=4 +ARG FLASK_GIT=https://github.com/jorgejesus/pywps-flask.git +ARG FLASK_BRANCH=pywps_4.2 RUN apk update && apk add --no-cache \ git \ @@ -27,35 +29,34 @@ RUN apk add --no-cache \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ geos \ geos-dev + #Compiling Xerces -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 && \ - tar xvf /tmp/xerces-c-${XERCES_VERSION}.tar.gz -C /tmp && \ - cd /tmp/xerces-c-${XERCES_VERSION} && \ +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 && \ + tar xvf /tmp/xerces-c-$XERCES_VERSION.tar.gz -C /tmp && \ + cd /tmp/xerces-c-$XERCES_VERSION && \ LDFLAGS="-s" ./configure --prefix=/usr/local/src/xerces && \ make -j $PROCESSOR_N install # Install GDAL -RUN wget http://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION}.tar.gz -O /tmp/gdal.tar.gz && \ +RUN wget http://download.osgeo.org/gdal/$GDAL_VERSION/gdal-$GDAL_VERSION.tar.gz -O /tmp/gdal.tar.gz && \ tar xzf /tmp/gdal.tar.gz -C /tmp && \ - cd /tmp/gdal-${GDAL_VERSION} && \ + cd /tmp/gdal-$GDAL_VERSION && \ LDFLAGS="-s" ./configure --with-expat=yes --with-xerces=/opt/xerces --with-geos=yes \ - && make -j ${PROCESSOR_N} && make install + && make -j $PROCESSOR_N && make install -RUN cd /tmp/gdal-${GDAL_VERSION}/swig/python \ +RUN cd /tmp/gdal-$GDAL_VERSION/swig/python \ && python3 setup.py install RUN rm -rf /var/cache/apk/* -RUN git clone https://github.com/geopython/pywps-flask.git - +RUN git clone $FLASK_GIT -b $FLASK_BRANCH --single-branch WORKDIR /pywps-flask RUN pip3 install -r requirements.txt - ENTRYPOINT ["/usr/bin/python3", "demo.py","-a"] -#docker build -t pywps-flask . -#docker run -p 5000:5000 pywps-flask +#docker build -t pywps/flask-alpine . +#docker run -p 5000:5000 pywps/flask-alpine:latest #http://localhost:5000/wps?request=GetCapabilities&service=WPS #http://localhost:5000/wps?request=DescribeProcess&service=WPS&identifier=all&version=1.0.0 diff --git a/docker/alpine/gunicorn/Dockerfile b/docker/alpine/gunicorn/Dockerfile index a670d0f..62f1cfb 100644 --- a/docker/alpine/gunicorn/Dockerfile +++ b/docker/alpine/gunicorn/Dockerfile @@ -1,5 +1,5 @@ -FROM pywps/flask-alpine:3.6 -MAINTAINER Jorge Samuel Mendes de Jesus +FROM pywps/flask-alpine:latest +MAINTAINER Jorge Samuel Mendes de Jesus #For Gunicorn ARG GU_WORKERS=5 @@ -17,7 +17,7 @@ RUN ln -s /pywps-flask/wsgi/pywps.wsgi /pywps-flask/wsgi/pywps_app.py ENTRYPOINT ["/run_all.sh"] -#Build: docker build -t pywps4:gunicorn . -#Usage: docker run -p 8081:8081 -it pywps4:nginx -#Usage w/ 10 workers: docker run -e GU_WORKERS=10 -e GU_PORT=8082 -p 8082:8082 -it pywps4:gunicorn +#Build: docker build -t pywps/gunicorn-alpine:latest . +#Usage: docker run -p 8081:8081 -it pywps/gunicorn-alpine:latest +#Usage w/ 10 workers: docker run -e GU_WORKERS=10 -e GU_PORT=8082 -p 8082:8082 -it pywps/gunicorn-alpine:latest diff --git a/docker/alpine/nginx/Dockerfile b/docker/alpine/nginx/Dockerfile index 8e846d8..dad1304 100644 --- a/docker/alpine/nginx/Dockerfile +++ b/docker/alpine/nginx/Dockerfile @@ -1,9 +1,10 @@ -FROM nginx:1.13.7-alpine +FROM nginx:1.15.7-alpine MAINTAINER Jorge Samuel Mendes de Jesus RUN rm /etc/nginx/conf.d/default.conf COPY pywps.conf /etc/nginx/conf.d/pywps.conf -#Build: docker build -t pywps4:nginx . -#Usage: docker run -p 80:80 -it pywps4:nginx +#Build: docker build -t pywps/nginx-alpine:latest . +#Usage: docker-compose up +#Usage: docker run -p 80:80 -it pywps/nginx-alpine:latest diff --git a/docker/alpine/nginx/docker-compose.yml b/docker/alpine/nginx/docker-compose.yml index cb62368..60bb8d8 100644 --- a/docker/alpine/nginx/docker-compose.yml +++ b/docker/alpine/nginx/docker-compose.yml @@ -2,9 +2,9 @@ version: '3.1' services: pywps: - image: pywps/gunicorn-alpine:3.6 + image: pywps/gunicorn-alpine:latest nginx: - image: pywps/nginx-alpine:3.6 + image: pywps/nginx-alpine:latest build: . depends_on: - pywps diff --git a/docker/isolation/Dockerfile b/docker/isolation/Dockerfile index ac97dcb..f84586a 100644 --- a/docker/isolation/Dockerfile +++ b/docker/isolation/Dockerfile @@ -1,9 +1,11 @@ -FROM alpine:3.6 -MAINTAINER Jorge S. Mendes de Jesus +FROM alpine:3.8 +MAINTAINER Jorge S. Mendes de Jesus ARG GDAL_VERSION=2.3.2 ARG XERCES_VERSION=3.2.2 ARG PROCESSOR_N=4 +ARG FLASK_GIT=https://github.com/jorgejesus/pywps-flask.git +ARG FLASK_BRANCH=pywps_4.2 RUN apk update && apk add --no-cache \ git \ @@ -17,38 +19,38 @@ RUN apk update && apk add --no-cache \ libxslt-dev \ linux-headers \ expat \ - expat-dev + expat-dev \ + g++ \ + libstdc++ \ + make \ + swig -RUN apk --update --no-cache add g++ libstdc++ make swig - -# Xerces -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 && \ - tar xvf /tmp/xerces-c-${XERCES_VERSION}.tar.gz -C /tmp && \ - cd /tmp/xerces-c-${XERCES_VERSION} && \ - ./configure --prefix=/opt/xerces && \ - make -j $PROCESSOR_N && \ - make install - -# Geos RUN apk add --no-cache \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ geos \ geos-dev +#Compiling Xerces +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 && \ + tar xvf /tmp/xerces-c-$XERCES_VERSION.tar.gz -C /tmp && \ + cd /tmp/xerces-c-$XERCES_VERSION && \ + LDFLAGS="-s" ./configure --prefix=/usr/local/src/xerces && \ + make -j $PROCESSOR_N install + + # Install GDAL -RUN wget http://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION}.tar.gz -O /tmp/gdal.tar.gz && \ +RUN wget http://download.osgeo.org/gdal/$GDAL_VERSION/gdal-$GDAL_VERSION.tar.gz -O /tmp/gdal.tar.gz && \ tar xzf /tmp/gdal.tar.gz -C /tmp && \ - cd /tmp/gdal-${GDAL_VERSION} && \ + cd /tmp/gdal-$GDAL_VERSION && \ CFLAGS="-g -Wall" LDFLAGS="-s" ./configure --with-expat=yes --with-xerces=/opt/xerces --with-geos=yes \ && make -j $PROCESSOR_N && make install -RUN cd /tmp/gdal-${GDAL_VERSION}/swig/python \ +RUN cd /tmp/gdal-$GDAL_VERSION/swig/python \ && python3 setup.py build \ && python3 setup.py install -RUN git clone https://github.com/geopython/pywps-flask.git - +RUN git clone $FLASK_GIT -b $FLASK_BRANCH --single-branch WORKDIR /pywps-flask RUN pip3 install -r requirements.txt @@ -56,7 +58,7 @@ RUN pip3 install -r requirements.txt EXPOSE 5000 ENTRYPOINT ["/usr/bin/python3", "demo.py","-a"] -#docker build -t pywps-flask . -#docker run -p 5000:5000 pywps-flask +#docker build -t pywps . +#docker run -p 5000:5000 pywps #http://localhost:5000/wps?request=GetCapabilities&service=WPS #http://localhost:5000/wps?request=DescribeProcess&service=WPS&identifier=all&version=1.0.0 diff --git a/docker/ubuntu/flask/Dockerfile b/docker/ubuntu/flask/Dockerfile index 14df29c..11e8e62 100644 --- a/docker/ubuntu/flask/Dockerfile +++ b/docker/ubuntu/flask/Dockerfile @@ -1,53 +1,53 @@ #based on https://hub.docker.com/r/geographica/gdal2/~/dockerfile/ -FROM phusion/baseimage:0.9.22 -MAINTAINER Jorge S. Mendes de Jesus +#Using a fat docker since other images like nginx-gunicorn will just incorporate extra services +FROM phusion/baseimage:0.11 +MAINTAINER Jorge S. Mendes de Jesus ARG ROOTDIR=/usr/local/ -ARG GDAL_VERSION=2.3.2 +ARG GDAL_VERSION=2.4.0 ARG PROCESSOR_N=8 +ARG FLASK_GIT=https://github.com/jorgejesus/pywps-flask.git +ARG FLASK_BRANCH=pywps_4.2 WORKDIR $ROOTDIR/ +RUN apt-get update -y && install_clean \ + software-properties-common \ + build-essential \ + python3-dev \ + python3-numpy \ + python3-lxml \ + python3-lxml \ + python3-pip \ + python3-wheel \ + python3-setuptools \ + libspatialite-dev \ + sqlite3 \ + libpq-dev \ + libxml2-dev \ + libcurl4-gnutls-dev \ + libproj-dev \ + libxml2-dev \ + libxslt-dev \ + libgeos-dev \ + libxerces-c-dev \ + git \ + cmake -RUN apt-get update -y && apt-get install -y \ - software-properties-common \ - python-software-properties \ - python3-software-properties \ - build-essential \ - python-dev \ - python3-dev \ - python-numpy \ - python3-numpy \ - python3-lxml \ - python3-pip \ - libspatialite-dev \ - sqlite3 \ - libpq-dev \ - libxml2-dev \ - libcurl4-gnutls-dev \ - libproj-dev \ - libxml2-dev \ - libxslt-dev \ - libgeos-dev \ - libspatialite-dev \ - libxerces-c-dev \ - libexpat1-dev \ - git \ - bash-completion \ - cmake -ADD http://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION}.tar.gz $ROOTDIR/src/ +ADD http://download.osgeo.org/gdal/$GDAL_VERSION/gdal-$GDAL_VERSION.tar.gz $ROOTDIR/src/ -RUN cd src/ && tar -xvf gdal-${GDAL_VERSION}.tar.gz && cd gdal-${GDAL_VERSION} \ +RUN cd src/ && tar -xvf gdal-$GDAL_VERSION.tar.gz && cd gdal-$GDAL_VERSION \ && LDFLAGS="-s" ./configure --with-python --with-geos --with-spatialite --with-pg --with-curl --with-xerces --with-expat \ - && make -j ${PROCESSOR_N} && make install && ldconfig \ - && cd $ROOTDIR && cd src/gdal-${GDAL_VERSION}/swig/python \ + && make -j $PROCESSOR_N && make install && ldconfig \ + && cd $ROOTDIR && cd src/gdal-$GDAL_VERSION/swig/python \ && python3 setup.py build \ && python3 setup.py install \ && cd $ROOTDIR && rm -Rf src/gdal* + WORKDIR / -RUN git clone https://github.com/geopython/pywps-flask.git +RUN git clone $FLASK_GIT -b $FLASK_BRANCH --single-branch WORKDIR /pywps-flask RUN pip3 install -r requirements.txt @@ -56,11 +56,11 @@ RUN mkdir /etc/service/pywps4 COPY pywps4_service.sh /etc/service/pywps4/run RUN chmod +x /etc/service/pywps4/run + EXPOSE 5000 -ENTRYPOINT ["/usr/bin/python3", "demo.py","-a"] -#docker build -t pywps-flask . -#docker run -p 5000:5000 pywps-flask +#docker build -t pywps/flask-ubuntu:latest . +#docker run -p 5000:5000 pywps/flask-ubuntu #http://localhost:5000/wps?request=GetCapabilities&service=WPS #http://localhost:5000/wps?request=DescribeProcess&service=WPS&identifier=all&version=1.0.0 \ No newline at end of file diff --git a/docker/ubuntu/nginx-gunicorn/Dockerfile b/docker/ubuntu/nginx/Dockerfile similarity index 83% rename from docker/ubuntu/nginx-gunicorn/Dockerfile rename to docker/ubuntu/nginx/Dockerfile index a8da4aa..0aaef19 100644 --- a/docker/ubuntu/nginx-gunicorn/Dockerfile +++ b/docker/ubuntu/nginx/Dockerfile @@ -1,5 +1,5 @@ #based on https://hub.docker.com/r/geographica/gdal2/~/dockerfile/ -FROM pywps/flask-ubuntu:16.0.4 +FROM pywps/flask-ubuntu:latest MAINTAINER Jorge S. Mendes de Jesus #For Gunicorn @@ -17,7 +17,6 @@ RUN pip3 install gunicorn RUN ln -s /pywps-flask/wsgi/pywps.wsgi /pywps-flask/wsgi/pywps_app.py - COPY pywps4_service.sh /etc/service/pywps4/run RUN chmod +x /etc/service/pywps4/run @@ -26,12 +25,10 @@ COPY nginx_service.sh /etc/service/nginx/run RUN chmod +x /etc/service/nginx/run EXPOSE 80 - -#EXPOSE 5000 -#ENTRYPOINT ["/usr/bin/python3", "demo.py","-a"] -#docker build -t pywps-flask . -#docker run -p 5000:5000 pywps-flask + +#docker build -t pywps/nginx-ubuntu . +#docker run -p 80:80 pywps/nginx-ubuntu #http://localhost:5000/wps?request=GetCapabilities&service=WPS #http://localhost:5000/wps?request=DescribeProcess&service=WPS&identifier=all&version=1.0.0 \ No newline at end of file diff --git a/docker/ubuntu/nginx-gunicorn/nginx_service.sh b/docker/ubuntu/nginx/nginx_service.sh similarity index 100% rename from docker/ubuntu/nginx-gunicorn/nginx_service.sh rename to docker/ubuntu/nginx/nginx_service.sh diff --git a/docker/ubuntu/nginx-gunicorn/pywps.conf b/docker/ubuntu/nginx/pywps.conf similarity index 100% rename from docker/ubuntu/nginx-gunicorn/pywps.conf rename to docker/ubuntu/nginx/pywps.conf diff --git a/docker/ubuntu/nginx-gunicorn/pywps4_service.sh b/docker/ubuntu/nginx/pywps4_service.sh similarity index 100% rename from docker/ubuntu/nginx-gunicorn/pywps4_service.sh rename to docker/ubuntu/nginx/pywps4_service.sh diff --git a/docs/conf.py b/docs/conf.py index c18d73f..d781f9f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -62,9 +62,9 @@ # built documents. # # The short X.Y version. -version = u'4.0.0' +version = u'4.2' # The full version, including alpha/beta/rc tags. -release = u'4.0.0' +release = u'4.2.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/processes/grassbuffer.py b/processes/grassbuffer.py index 926487d..6bcd3b1 100644 --- a/processes/grassbuffer.py +++ b/processes/grassbuffer.py @@ -8,10 +8,11 @@ class GrassBuffer(Process): + def __init__(self): inputs = [ComplexInput('poly_in', 'Input1', supported_formats=[Format('application/gml+xml')], - mode=MODE.STRICT), + mode=MODE.SIMPLE), LiteralInput('buffer', 'Buffer', data_type='float', allowed_values=(0, 1, 10, (10, 10, 100), (100, 100, 1000)))] outputs = [ComplexOutput('buff_out', 'Buffered', diff --git a/processes/jsonprocess.py b/processes/jsonprocess.py index bab3676..70127dd 100644 --- a/processes/jsonprocess.py +++ b/processes/jsonprocess.py @@ -11,7 +11,7 @@ def __init__(self): self._handler, identifier='testjson', title='Process Test', - version='1.0.0.0', + version='1.0.0', inputs=inputs, outputs=outputs, store_supported=True, diff --git a/requirements.txt b/requirements.txt index 93b2b3a..e427a56 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,4 @@ Shapely Werkzeug SQLAlchemy psutil --e git+https://github.com/geopython/pywps.git@master#egg=pywps-master +pywps diff --git a/setup.py b/setup.py index 7c92362..af2d466 100644 --- a/setup.py +++ b/setup.py @@ -67,7 +67,7 @@ 'version': VERSION, 'install_requires': INSTALL_REQUIRES, 'dependency_links': [ - 'git+https://github.com/lazaa32/pywps.git@pywps-'+VERSION+'#egg=pywps-'+VERSION + 'git+https://github.com/geopython/pywps.git@pywps-'+VERSION+'#egg=pywps-'+VERSION ], 'packages': ['processes', 'tests'], 'scripts': ['demo.py'],