In this document, we are going to discuss, how to setup VTSD and Mapproxy servers along with Nginx server for production.
Before you start, you should be familiar with basic concepts of Docker and have Docker installed.
Getting the configuration¶
Docker configuration is distributed along with the vts-backend package. You have to
git clone the
dpkg-buildpackage the content, after that, all needed files are
available in the
vts-backend project directory and we can proceed to
generate the Docker images and start te Containers.
git clone --recursive https://github.com/melowntech/vts-backend.git cd vts-backend make
You may obtain
dpkg-buildpackage: error: failed to sign .changes file error after your run
make. That is ok
you can still continue
Build and run the VTSD Docker Container¶
To get VTSD container up and running, use:
docker build -t vts-vtsd:latest -f docker/vtsd/Dockerfile .
If you were trying to follow one of our backend tutorials,
you may have the
storage directory already in your host
computer. You can therefore start the container with existing directory mounted
docker run -ti -p 3060:3060 -v /path/to/vtsd-storage:/var/vts/store:rw --name vtsd vts-vtsd
Build and run the Mapproxy Docker Container¶
First build the Docker image:
docker build -t vts-mapproxy:latest -f docker/mapproxy/Dockerfile .
You can now run the container directly, there are already examples being part of the deployment.
But again, if you followed some backend tutorials, you have
datasets directory already available along with the
`- project/ `- resources.json `- datasets/
You can mount it as Bind volume.
docker run -ti -p 3070:3070 -v /my/projects/project:/vts/datasets/project –name mapproxy vts-mapproxy
VTS-Mapproxy is configured, so that
- it is excpeting
/vts/datasets/.../resources.jsonfiles to be at the image available.
resources.jsonshall cotain absolute paths to existing datasets.