akvo / akvo-maps

Akvo Maps service
GNU Affero General Public License v3.0
0 stars 1 forks source link
docker gis postgis windshaft

akvo-maps

Akvo Maps provide a Docker image of Windshaft based server.

Usage

Run

The latest docker image can be found at https://hub.docker.com/r/akvo/akvo-maps/

The image expects to find the configuration file at /config/environment.js. The provided configuration file will be merged with the default configuration

The default configuration does not provides defaults for everything. You will need to provide some values. See an configuraton file example

Some of the configuration is just passed to Windshaft. See the renderer section on this example for some documentation.

Redis

Windshaft uses Redis to store the queries, so a Redis DB must be made available and the configuration must point to it.

API

See Windshaft API docs

Additionally, to create the layergroup, you need to provide the following headers:

  1. X-DB-HOST: Postgres DB host.
  2. X-DB-USER: Postgres DB user.
  3. X-DB-PASSWORD: Postgres DB password.
  4. X-DB-NAME: Postgres DB name.
  5. X-DB-PORT: Postgres DB port.
  6. X-DB-LAST-UPDATE. See caching docs

Javascript client example

See an example that uses Leaflet.

Development

Run:

docker-compose up 

This will create an environment with:

See the docker-compose.yml file for the enabled ports.

Once docker has started, you can use the viewer to play around with it.

Running tests

Connect to the Clojure REPL and run them from there or run:

docker-compose run tests lein test