{"id":13557378,"url":"https://github.com/Qwant/kartotherian_docker","last_synced_at":"2025-04-03T11:31:56.766Z","repository":{"id":44634803,"uuid":"106390503","full_name":"Qwant/kartotherian_docker","owner":"Qwant","description":"Docker deployment for Qwant Maps tile server, based on Kartotherian (https://github.com/kartotherian/kartotherian)","archived":true,"fork":false,"pushed_at":"2023-06-11T22:19:02.000Z","size":823,"stargazers_count":29,"open_issues_count":10,"forks_count":12,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-11-04T07:36:02.344Z","etag":null,"topics":["docker","imposm","kartotherian","maps","openmaptiles","qwant-maps","tile-generator"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Qwant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-10-10T08:35:36.000Z","updated_at":"2024-08-18T19:27:43.000Z","dependencies_parsed_at":"2023-02-01T03:01:08.754Z","dependency_job_id":"7aa3bcef-e8b0-437c-8796-fc1f94278d93","html_url":"https://github.com/Qwant/kartotherian_docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qwant%2Fkartotherian_docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qwant%2Fkartotherian_docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qwant%2Fkartotherian_docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qwant%2Fkartotherian_docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qwant","download_url":"https://codeload.github.com/Qwant/kartotherian_docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246993118,"owners_count":20865939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","imposm","kartotherian","maps","openmaptiles","qwant-maps","tile-generator"],"created_at":"2024-08-01T12:04:18.796Z","updated_at":"2025-04-03T11:31:51.752Z","avatar_url":"https://github.com/Qwant.png","language":"Python","funding_links":[],"categories":["Python","docker"],"sub_categories":[],"readme":"# kartotherian_docker\n\ndocker images for the [kartotherian project](https://github.com/kartotherian/kartotherian)\n\nThey use a mixed architecture of Kartotherian and [openmaptiles](https://github.com/openmaptiles/openmaptiles)\nYou need a docker version \u003e 18.06\n\n## \"Quick\" Start for local testing\n\nUse these commmands to download, import data and create tiles jobs for Luxembourg:\n\n(Optional) First, delete all related containers and volumes (from an older import):\n\n**If sudo required, use \"-E\"!!**\n\n```bash\n./exec.py clean\n```\n\nDownload, import and start the tiles generation (of Luxembourg by default):\n\n```bash\n./exec.py load-db # it runs the build command as a dependency on 'load-db'\n```\n\nOnce all tiles are generated, the map is visible on `http://localhost:8585`! (If not, take a look at `docker ps` and see what the port of the image `qwantresearch/erdapfel` is.)\n\nIf you want to see the list of all available commands, use `-h` or `--help` option on `exec.py`.\n\n## Workflow\n\nIf you want to update the generation process, you need to edit [Qwant/openmaptiles](https://github.com/Qwant/openmaptiles) then update the openmaptiles submodule.\n\n## running\n\nTo launch kartotherian just do:\n\n`./exec.py kartotherian`\n\n(you might need `sudo` permissions depending on your setup)\n\n### Import in Postgres\n\nto download a pbf and load data in postgres and generate tiles you need:\n\n`./exec.py load-db`\n\nNote that you can specify the PBF you want to give by using the `--osm-file` option.\n\nThe different way to configure the import can be seen in [this readme](./import_data/README.md).\n\nNote: the first import might be quite long are some additional data will be downloaded (cf [load_db](./load_db/README.md))\n\nIf you want to use already downloaded data (especially usefull for a quicker dev cycle), you can use a mounted docker volume.\n\nThe file `local-compose.yml` gives an example of how to bind a named docker volume (the file uses a `./data` directory but you can change it if you want).\n\nTo use a locally mounted volume add the `local-compose.yml` with the `-f` docker-compose option.\n\nFor an easier dev experience, you can use the docker-compose additional file `local-compose.yml` that forward ports, use a locally `./data` mounted volume (to avoid some unnecessary download) and run a front end to view the tiles.\n\nFor example with this setup you can also provide an already downloaded pbf (it needs to be in the `./data` volume) with `--osm-file`:\n\n```bash\n./exec.py --osm-file /data/input/luxembourg-latest.osm.pbf load-db\n```\n\nNote: even if the local directoy in `./data` the osm file path is \"/data/**input**/\" because it's the directory path inside the container.\n\nYou can also specify a download url:\n\n```bash\n./exec.py --osm-file https://download.geofabrik.de/europe/luxembourg-latest.osm.pbf load-db\n```\n\n### Tiles generation\n\nThe tiles generation is also handle by the `load_db` container.\n\nTo only generate 1 tile, you can set `--tiles-coords [[x, y, z]]`. x, y, and z are based on the [Slippy Map Tile name](https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames) system and you can use [Geofabrik's tool](https://tools.geofabrik.de/calc/#6/51.25727/10.45457\u0026type=Mapnik\u0026grid=1) to generate these for a specific location.\n\nThe different ways to configure the tiles generation can be seen [in the default configuration file](https://github.com/Qwant/kartotherian_docker/blob/master/import_data/invoke.yaml).\n\nIf you have forwarded the port, you can check the tile generation at `http://localhost:16534/jobs` and check a vector tile based map on `http://localhost:8585`\n\n\n### Updating tiles\n\nDuring the initial creation of the PG database, state and configuration files is initialized in the `update_tiles_data` volume from the .pbf metadata.\nTo launch the tiles update, run the `update-tiles` task (defined in load_db tasks):\n\n`./exec.py update-tiles`\n\nDuring this task:\n * osmosis will fetch latest changes from openstreetmap.org\n * imposm will apply these changes in the pg databse, and write a file with expired tiles\n * tilerator jobs will be created to generate new tiles\n\n\n## archi\n\nThe tile server architecture can be seen at [QwantMaps](https://github.com/QwantResearch/qwantmaps#global-picture)\n\n### sub-folders\n\nNormally you shouldn't need to change anything in the subfolders: everything is handled inside the docker files through `exec.py`. However, if you're interested in what these sub-folders are used for, go take a look to their `README.md` file.\n\n## configuration files\n\nThe SQL and imposm mapping generation is quite straigthforward (cf. `generate-sql` and `generate-imposm3` in the [documentation](https://github.com/openmaptiles/openmaptiles-tools/blob/master/README.md)).\n\nThe `data_tm2source_*.xml` generation is a bit more complex. We use `generate-tm2source` to generate a `Carto` project `.yml` file. This file is transformed to a Mapnik `.xml` project using [kosmtik](https://github.com/kosmtik/kosmtik).\n\nSee more details on https://github.com/Qwant/openmaptiles\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQwant%2Fkartotherian_docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FQwant%2Fkartotherian_docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQwant%2Fkartotherian_docker/lists"}