Skip to content

Docker Compose setup for Kartotherian ecosystem

License

Notifications You must be signed in to change notification settings

wikimedia/kartodock

 
 

Repository files navigation

Kartodock - Docker for GIS stacks and relatives

This repo is a prototype used to build all the needed stack technology to run Kartotherian and its repos.

Installation

Get Docker and possibly Docker Compose if it doesn't come with Docker.

To run the Kartotherian stack, make sure that you have Kartotherian installed under APP_CODE_PATH_HOST environment configuration.

By default APP_CODE_PATH_HOST=../, the directory tree should be something like this:

${APP_CODE_PATH_HOST}/
├── kartodock
└── kartotherian

Beware of memory constraints of your docker setup. The installation will fail with limited memory availability. See this issue for more details.

To start the setup execute the following commands:

cd kartodock
git submodule update -i --recursive
cp env-example .env
make up npm_install

In case you get a "permission denied" you might need to add yourself to the "docker" group:

sudo groupadd docker
sudo usermod -aG docker $USER

You must log out and back in to make the rest of your system aware of this change. newgrp docker doesn't work.

OSM initial import

After the container is up you need to setup you OSM DB. The osm-initial-script which execute the initial OSM import is not prepared for full planet import, you should pick a small set of the planet from the Geofrabrik website. Get the PBF file link from your choice and execute the following command passing it as an argument with -p flag, you can also identify the DB host with -H, the default is postgres-postgis:

make osm ARGS='-p http://download.geofabrik.de/asia/israel-and-palestine-latest.osm.pbf -H postgres-postgis'

The example above might take up to 30 minutes to fully setup.

or for a smaller dataset,

make osm ARGS='-p http://download.geofabrik.de/europe/monaco-latest.osm.pbf -H postgres-postgis'

Warning: The script downloads water polygons shapefile with >500 MB size.

Execution

Now you're all set! You should be able to execute tegola and generate some tiles or kartotherian to see the tiles you have generated.

make up
make run_kartotherian

In your MediaWiki installation you can now set $wgKartographerMapServer to http://localhost:6533. Make sure your wiki's host name and $wgServer isn't "localhost", otherwise Kartotherian won't be able to call back to your wiki.

Useful scripts

To execute npm install inside the docker contianer:

make npm_install

To execute npm test inside the docker container:

make npm_test

TODO

  • Fix user permissions through the Dockerfiles
  • Refactor dependecy linking for packages not present in the repo
  • Installation script
  • Setup oficial Wikimedia nodejs images

About

Docker Compose setup for Kartotherian ecosystem

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 46.7%
  • PLpgSQL 26.8%
  • Dockerfile 19.3%
  • Makefile 7.2%