Mapproxy running on NGINX with uWSGI and Supervisor
This project aims to fulfill two needs:
- create a OGC services that are deployable on a scalable infrastructure.
- create a useable Docker base image.
Fulfilling the first need the main purpose is to create an Docker base image that eventually can be run on a platform like Kubernetes.
Regarding the second need, finding a usable Mapproxy Docker image is a challenge. Most image rely on old versions of Mapproxy and or Python.
It will create an Mapproxy application run with a modern web application NGINX that is easy to use. The only thing required to do is to add you own mapproxy.yaml configuration.
This stack is composed of the following:
Mapproxy is the platform that will provide the WMTS, TMS or WMS services based on a OGC source.
NGINX is the web server we use to run Mapproxy as a uWSGI web application.
Because we are running 2 processes (Mapproxy uWSGI & NGINX) in a single Docker image we use Supervisor as a controller.
docker build -t pdok/mapproxy-nginx .
This image can be run straight from the commandline.
docker run -d -p 80:80 --name mapproxy pdok/mapproxy-nginx
The prefered way to use it is as a Docker base image for an other Dockerfile, in which the necessay files are copied into the right directory (/usr/local/mapproxy)
FROM pdok/mapproxy-nginx
COPY /etc/config/mapproxy.yaml /usr/local/mapproxy/mapproxy.yaml
Running the example above will create a service on the url: http:/localhost/mapproxy/.
Because we want to use the WTMS getFeatureInfo proxy pass, that will be released with 1.12.0. We did not alter any code, but we have forked from a stable development build.
We would like to run this on a scalable infrastructure like Kubernetes that has it's Ingress based on NGINX. By keeping both the same we hope to have less differentiation in our application stack.