MapProxy via Docker
Build the container
Stable releases
TAG: openquake/mapprox-server:stable
, openquake/mapprox-server:1.12.0
$ docker build --build-arg uid=$(id -u) -t openquake/mapproxy-server .
Built from master tree
TAG: openquake/mapprox-server:master
$ docker build --build-arg uid=$(id -u) \
--build-arg pkg=https://github.com/mapproxy/mapproxy/archive/master.zip \
-t openquake/mapproxy-server .
You may skip these steps. The container will be downloaded from the Docker Hub.
Run the docker and map host data
$ docker run -v $(pwd):/io -u $(id -u):$(id -g) -d -p 8080:8080 openquake/mapproxy-server
Custom configurations via env vars
MAPPROXY_NAME
: specify the name of processes spawned bygunicorn
. Default ismapproxy
. This feature usessetproctitle
MAPPROXY_CPU
: set the number of CPU to be used byMapProxy
. By default it's the number of available CPU in the containerMAPPROXY_DEV
: runMapProxy
in the development mode using its development server instead ofgunicorn
MAPPROXY_WORKER
: specify the worker to be used bygunicorn
. Default isgthread
. This option is available only ifMAPPROXY_DEV
is not set
Data dir structure
$(pwd)
must have the following structure:
/io
|
|-- conf
|-- conf_1.yaml
|-- conf_2.yaml
|-- conf_n.yaml
Services provided
This Docker container by default exposes HTTP on port 8080
via gunicorn
. It must be proxyed via an HTTP proxy (like nginx
, see the provided docker-compose.yml
).