| 
									
										
										
										
											2020-04-22 06:48:57 +00:00
										 |  |  | # This version must match the MAKE_DC_VERSION value below
 | 
					
						
							| 
									
										
										
										
											2021-04-09 11:42:58 +00:00
										 |  |  | version: "3"
 | 
					
						
							| 
									
										
										
										
											2020-04-22 06:48:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-06 10:57:40 +00:00
										 |  |  | volumes:
 | 
					
						
							|  |  |  |   pgdata:
 | 
					
						
							| 
									
										
										
										
											2020-04-22 06:48:57 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | networks:
 | 
					
						
							| 
									
										
										
										
											2021-03-30 06:46:42 +00:00
										 |  |  |   postgres:
 | 
					
						
							| 
									
										
										
										
											2020-04-22 06:48:57 +00:00
										 |  |  |     driver: bridge
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-06 05:45:00 +00:00
										 |  |  | services:
 | 
					
						
							| 
									
										
										
										
											2020-04-22 06:48:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-06 05:45:00 +00:00
										 |  |  |   postgres:
 | 
					
						
							| 
									
										
										
										
											2020-04-22 15:15:20 +00:00
										 |  |  |     image: "${POSTGIS_IMAGE:-openmaptiles/postgis}:${TOOLS_VERSION}"
 | 
					
						
							| 
									
										
											  
											
												Upgrade to tools v5 - rm import-osm, new downloader... (#785)
Update to tools v5. See https://github.com/openmaptiles/openmaptiles-tools/releases/tag/v5.0.0 for the list of all changes. Other OMT-repo specific changes:
* removes `import-osm` docker usage, replacing it with `openmaptiles-tools`
* quickstart builds faster because it uses postgres with preloaded water, natural earth, and lake centerlines tables.
### Makefile targets
* `tools-dev` will open a shell in a docker to experiment and debug (instead of `import-sql-dev` and `import-osm-dev`)
* separated `start-maputnik` from `start-postserve`
* renamed `clean-docker` into `db-destroy` to make it more explicit
* cleaner `db-start`, `db-stop`, `db-destroy` targets
* `db-start-preloaded` is the same as `db-start`, except that it uses `postgis-preloaded` -- an image with preloaded water, natural-earth, and lake centerline data
* `db-start` will not recreate the container if it already exists -- this way if it was started as preloaded, it will not be rebuilt.
* better output messages
### Quickstart
* uses `postgis-preloaded` image by default to make quickstart quicker.  To start with a clean db, pass 2 parameters to quickstart, e.g. `./quickstart.sh albania empty`
											
										 
											2020-05-05 15:53:09 +00:00
										 |  |  |     # Use "command: postgres -c jit=off" for PostgreSQL 11+ because of slow large MVT query processing
 | 
					
						
							| 
									
										
										
										
											2022-10-20 09:11:44 +00:00
										 |  |  |     # Use "shm_size: 512m" if you want to prevent a possible 'No space left on device' during 'make generate-tiles-pg'
 | 
					
						
							| 
									
										
										
										
											2016-10-06 05:45:00 +00:00
										 |  |  |     volumes:
 | 
					
						
							| 
									
										
										
										
											2019-12-11 14:26:25 +00:00
										 |  |  |       - pgdata:/var/lib/postgresql/data
 | 
					
						
							| 
									
										
										
										
											2017-02-01 21:34:17 +00:00
										 |  |  |     networks:
 | 
					
						
							| 
									
										
										
										
											2021-03-30 06:46:42 +00:00
										 |  |  |       - postgres
 | 
					
						
							| 
									
										
										
										
											2016-10-06 05:45:00 +00:00
										 |  |  |     ports:
 | 
					
						
							| 
									
										
										
										
											2022-04-19 19:33:03 +00:00
										 |  |  |       - "${PGPORT:-5432}:${PGPORT:-5432}"
 | 
					
						
							|  |  |  |     env_file: .env
 | 
					
						
							|  |  |  |     environment:
 | 
					
						
							|  |  |  |       # postgress container uses old variable names
 | 
					
						
							|  |  |  |       POSTGRES_DB: ${PGDATABASE:-openmaptiles}
 | 
					
						
							|  |  |  |       POSTGRES_USER: ${PGUSER:-openmaptiles}
 | 
					
						
							|  |  |  |       POSTGRES_PASSWORD: ${PGPASSWORD:-openmaptiles}
 | 
					
						
							|  |  |  |       PGPORT: ${PGPORT:-5432}
 | 
					
						
							| 
									
										
										
										
											2020-04-22 06:48:57 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   import-data:
 | 
					
						
							|  |  |  |     image: "openmaptiles/import-data:${TOOLS_VERSION}"
 | 
					
						
							| 
									
										
										
										
											2016-10-28 14:11:26 +00:00
										 |  |  |     env_file: .env
 | 
					
						
							| 
									
										
										
										
											2017-02-01 21:34:17 +00:00
										 |  |  |     networks:
 | 
					
						
							| 
									
										
										
										
											2021-03-30 06:46:42 +00:00
										 |  |  |       - postgres
 | 
					
						
							| 
									
										
										
										
											2020-04-22 06:48:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-22 11:43:59 +00:00
										 |  |  |   openmaptiles-tools: &openmaptiles-tools
 | 
					
						
							| 
									
										
										
										
											2020-01-22 21:16:38 +00:00
										 |  |  |     image: "openmaptiles/openmaptiles-tools:${TOOLS_VERSION}"
 | 
					
						
							| 
									
										
										
										
											2017-11-10 20:28:12 +00:00
										 |  |  |     env_file: .env
 | 
					
						
							| 
									
										
										
										
											2020-04-22 06:48:57 +00:00
										 |  |  |     environment:
 | 
					
						
							|  |  |  |       # Must match the version of this file (first line)
 | 
					
						
							|  |  |  |       # download-osm will use it when generating a composer file
 | 
					
						
							| 
									
										
										
										
											2021-04-09 11:42:58 +00:00
										 |  |  |       MAKE_DC_VERSION: "3"
 | 
					
						
							| 
									
										
										
										
											2020-09-23 07:09:22 +00:00
										 |  |  |       # Allow DIFF_MODE, MIN_ZOOM, and MAX_ZOOM to be overwritten from shell
 | 
					
						
							| 
									
										
										
										
											2020-04-22 15:15:20 +00:00
										 |  |  |       DIFF_MODE: ${DIFF_MODE}
 | 
					
						
							| 
									
										
										
										
											2020-09-23 07:09:22 +00:00
										 |  |  |       MIN_ZOOM: ${MIN_ZOOM}
 | 
					
						
							|  |  |  |       MAX_ZOOM: ${MAX_ZOOM}
 | 
					
						
							| 
									
										
										
										
											2020-10-26 16:39:49 +00:00
										 |  |  |       #Provide BBOX from *.bbox file if exists, else from .env
 | 
					
						
							|  |  |  |       BBOX: ${BBOX}
 | 
					
						
							| 
									
										
										
										
											2020-06-09 14:00:10 +00:00
										 |  |  |       # Imposm configuration file describes how to load updates when enabled
 | 
					
						
							|  |  |  |       IMPOSM_CONFIG_FILE: ${IMPOSM_CONFIG_FILE}
 | 
					
						
							| 
									
										
										
										
											2020-06-09 13:53:02 +00:00
										 |  |  |       # Control import-sql processes
 | 
					
						
							|  |  |  |       MAX_PARALLEL_PSQL: ${MAX_PARALLEL_PSQL}
 | 
					
						
							| 
									
										
										
										
											2022-04-19 19:33:03 +00:00
										 |  |  |       PGDATABASE: ${PGDATABASE:-openmaptiles}
 | 
					
						
							|  |  |  |       PGUSER: ${PGUSER:-openmaptiles}
 | 
					
						
							|  |  |  |       PGPASSWORD: ${PGPASSWORD:-openmaptiles}
 | 
					
						
							|  |  |  |       PGPORT: ${PGPORT:-5432}
 | 
					
						
							| 
									
										
										
										
											2022-04-28 07:30:15 +00:00
										 |  |  |       MBTILES_FILE: ${MBTILES_FILE}
 | 
					
						
							| 
									
										
										
										
											2017-11-10 20:28:12 +00:00
										 |  |  |     networks:
 | 
					
						
							| 
									
										
										
										
											2021-03-30 06:46:42 +00:00
										 |  |  |       - postgres
 | 
					
						
							| 
									
										
										
										
											2017-11-10 20:28:12 +00:00
										 |  |  |     volumes:
 | 
					
						
							| 
									
										
										
										
											2020-01-22 21:16:38 +00:00
										 |  |  |       - .:/tileset
 | 
					
						
							| 
									
										
										
										
											2020-03-06 18:15:54 +00:00
										 |  |  |       - ./data:/import
 | 
					
						
							| 
									
										
										
										
											2021-02-05 13:58:42 +00:00
										 |  |  |       - ./data:/export
 | 
					
						
							| 
									
										
										
										
											2020-05-18 18:26:51 +00:00
										 |  |  |       - ./build/sql:/sql
 | 
					
						
							| 
									
										
										
										
											2020-04-22 15:15:20 +00:00
										 |  |  |       - ./build:/mapping
 | 
					
						
							|  |  |  |       - ./cache:/cache
 | 
					
						
							| 
									
										
										
										
											2022-10-06 14:09:21 +00:00
										 |  |  |       - ./style:/style
 | 
					
						
							| 
									
										
										
										
											2020-04-22 06:48:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-22 11:43:59 +00:00
										 |  |  |   update-osm:
 | 
					
						
							|  |  |  |     <<: *openmaptiles-tools
 | 
					
						
							|  |  |  |     command: import-update
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-16 08:57:23 +00:00
										 |  |  |   generate-changed-vectortiles:
 | 
					
						
							| 
									
										
										
										
											2019-12-12 17:40:31 +00:00
										 |  |  |     image: "openmaptiles/generate-vectortiles:${TOOLS_VERSION}"
 | 
					
						
							| 
									
										
										
										
											2017-01-16 08:57:23 +00:00
										 |  |  |     command: ./export-list.sh
 | 
					
						
							|  |  |  |     volumes:
 | 
					
						
							| 
									
										
										
										
											2019-12-11 14:26:25 +00:00
										 |  |  |       - ./data:/export
 | 
					
						
							|  |  |  |       - ./build/openmaptiles.tm2source:/tm2source
 | 
					
						
							| 
									
										
										
										
											2017-02-01 21:34:17 +00:00
										 |  |  |     networks:
 | 
					
						
							| 
									
										
										
										
											2021-03-30 06:46:42 +00:00
										 |  |  |       - postgres
 | 
					
						
							| 
									
										
										
										
											2017-01-16 08:57:23 +00:00
										 |  |  |     env_file: .env
 | 
					
						
							| 
									
										
										
											
												Rework download area support (#908)
Closes #904
* Make all data-related targets like `download*`, `import-osm`, `import-borders`, and `generate-tiles` into `area`-aware -- making it possible for multiple data files to coexist inside the `./data` dir.
* Add `make download area=... [url=...]` command to automatically download any kind of area by checking Geofabrik, BBBike, and OSM.fr, optionally from a custom URL. Supports `area=planet` too.
* Do not re-download area with `make download-*` if it already exists.
* Automatically rename `<area>-latest.osm.pbf` into `<area>.osm.pbf`
* If `area=...` parameter is not given to `make`, see if there is exactly one `*.osm.pbf` file, and if so, use `*` as the `area`.
* Configure many variables in the .env file, overriding the defaults in tools
* If `<area>.osm.pbf` exists, but `<area>.dc-config.pbf` is missing, generate it using `download-osm make-dc` command.
Also:
* closes #614
* closes #647
* partially addresses #261
											
										 
											2020-06-03 19:37:45 +00:00
										 |  |  |     environment:
 | 
					
						
							|  |  |  |       MBTILES_NAME: ${MBTILES_FILE}
 | 
					
						
							| 
									
										
										
										
											2020-09-01 11:46:53 +00:00
										 |  |  |       # Control tilelive-copy threads
 | 
					
						
							|  |  |  |       COPY_CONCURRENCY: ${COPY_CONCURRENCY}
 | 
					
						
							| 
									
										
										
										
											2022-04-19 19:33:03 +00:00
										 |  |  |       PGDATABASE: ${PGDATABASE:-openmaptiles}
 | 
					
						
							|  |  |  |       PGUSER: ${PGUSER:-openmaptiles}
 | 
					
						
							|  |  |  |       PGPASSWORD: ${PGPASSWORD:-openmaptiles}
 | 
					
						
							|  |  |  |       PGPORT: ${PGPORT:-5432}
 | 
					
						
							| 
									
										
										
										
											2020-04-22 06:48:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-30 15:31:38 +00:00
										 |  |  |   generate-vectortiles:
 | 
					
						
							| 
									
										
										
										
											2019-12-12 17:40:31 +00:00
										 |  |  |     image: "openmaptiles/generate-vectortiles:${TOOLS_VERSION}"
 | 
					
						
							| 
									
										
										
										
											2016-10-08 20:04:12 +00:00
										 |  |  |     volumes:
 | 
					
						
							| 
									
										
										
										
											2019-12-11 14:26:25 +00:00
										 |  |  |       - ./data:/export
 | 
					
						
							|  |  |  |       - ./build/openmaptiles.tm2source:/tm2source
 | 
					
						
							| 
									
										
										
										
											2017-02-01 21:34:17 +00:00
										 |  |  |     networks:
 | 
					
						
							| 
									
										
										
										
											2021-03-30 06:46:42 +00:00
										 |  |  |       - postgres
 | 
					
						
							| 
									
										
										
										
											2016-10-08 20:04:12 +00:00
										 |  |  |     env_file: .env
 | 
					
						
							|  |  |  |     environment:
 | 
					
						
							| 
									
										
										
											
												Rework download area support (#908)
Closes #904
* Make all data-related targets like `download*`, `import-osm`, `import-borders`, and `generate-tiles` into `area`-aware -- making it possible for multiple data files to coexist inside the `./data` dir.
* Add `make download area=... [url=...]` command to automatically download any kind of area by checking Geofabrik, BBBike, and OSM.fr, optionally from a custom URL. Supports `area=planet` too.
* Do not re-download area with `make download-*` if it already exists.
* Automatically rename `<area>-latest.osm.pbf` into `<area>.osm.pbf`
* If `area=...` parameter is not given to `make`, see if there is exactly one `*.osm.pbf` file, and if so, use `*` as the `area`.
* Configure many variables in the .env file, overriding the defaults in tools
* If `<area>.osm.pbf` exists, but `<area>.dc-config.pbf` is missing, generate it using `download-osm make-dc` command.
Also:
* closes #614
* closes #647
* partially addresses #261
											
										 
											2020-06-03 19:37:45 +00:00
										 |  |  |       MBTILES_NAME: ${MBTILES_FILE}
 | 
					
						
							| 
									
										
										
										
											2017-01-06 10:53:11 +00:00
										 |  |  |       BBOX: ${BBOX}
 | 
					
						
							|  |  |  |       MIN_ZOOM: ${MIN_ZOOM}
 | 
					
						
							|  |  |  |       MAX_ZOOM: ${MAX_ZOOM}
 | 
					
						
							| 
									
										
										
										
											2020-09-01 11:46:53 +00:00
										 |  |  |       # Control tilelive-copy threads
 | 
					
						
							|  |  |  |       COPY_CONCURRENCY: ${COPY_CONCURRENCY}
 | 
					
						
							|  |  |  |       #
 | 
					
						
							| 
									
										
										
										
											2022-04-19 19:33:03 +00:00
										 |  |  |       PGDATABASE: ${PGDATABASE:-openmaptiles}
 | 
					
						
							|  |  |  |       PGUSER: ${PGUSER:-openmaptiles}
 | 
					
						
							|  |  |  |       PGPASSWORD: ${PGPASSWORD:-openmaptiles}
 | 
					
						
							|  |  |  |       PGPORT: ${PGPORT:-5432}
 | 
					
						
							| 
									
										
										
										
											2020-04-22 06:48:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-10 22:35:01 +00:00
										 |  |  |   postserve:
 | 
					
						
							| 
									
										
										
										
											2019-12-12 17:40:31 +00:00
										 |  |  |     image: "openmaptiles/openmaptiles-tools:${TOOLS_VERSION}"
 | 
					
						
							| 
									
										
										
										
											2020-10-12 13:45:09 +00:00
										 |  |  |     command: "postserve ${TILESET_FILE} --verbose --serve=${OMT_HOST:-http://localhost}:${PPORT:-8090}"
 | 
					
						
							| 
									
										
										
										
											2017-05-10 22:35:01 +00:00
										 |  |  |     env_file: .env
 | 
					
						
							| 
									
										
										
										
											2020-09-02 17:14:55 +00:00
										 |  |  |     environment:
 | 
					
						
							|  |  |  |       TILESET_FILE: ${TILESET_FILE}
 | 
					
						
							| 
									
										
										
										
											2017-05-10 22:35:01 +00:00
										 |  |  |     networks:
 | 
					
						
							| 
									
										
										
										
											2021-03-30 06:46:42 +00:00
										 |  |  |       - postgres
 | 
					
						
							| 
									
										
										
										
											2017-05-10 22:35:01 +00:00
										 |  |  |     ports:
 | 
					
						
							| 
									
										
										
										
											2020-05-26 19:19:52 +00:00
										 |  |  |       - "${PPORT:-8090}:${PPORT:-8090}"
 | 
					
						
							| 
									
										
										
										
											2017-05-10 22:35:01 +00:00
										 |  |  |     volumes:
 | 
					
						
							| 
									
										
										
										
											2019-12-12 17:40:31 +00:00
										 |  |  |       - .:/tileset
 | 
					
						
							| 
									
										
										
										
											2022-02-22 11:43:59 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   maputnik_editor:
 | 
					
						
							|  |  |  |     image: "maputnik/editor"
 | 
					
						
							|  |  |  |     ports:
 | 
					
						
							|  |  |  |       - "8088:8888"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   tileserver-gl:
 | 
					
						
							| 
									
										
										
										
											2022-10-06 14:09:21 +00:00
										 |  |  |     image: "maptiler/tileserver-gl:latest"
 | 
					
						
							| 
									
										
										
										
											2022-02-22 11:43:59 +00:00
										 |  |  |     command:
 | 
					
						
							|  |  |  |       - --port
 | 
					
						
							|  |  |  |       - "${TPORT:-8080}"
 | 
					
						
							| 
									
										
										
										
											2022-10-06 14:09:21 +00:00
										 |  |  |       - --config
 | 
					
						
							|  |  |  |       - "/style/config.json"
 | 
					
						
							| 
									
										
										
										
											2022-02-22 11:43:59 +00:00
										 |  |  |     ports:
 | 
					
						
							|  |  |  |       - "${TPORT:-8080}:${TPORT:-8080}"
 | 
					
						
							|  |  |  |     volumes:
 | 
					
						
							|  |  |  |       - ./data:/data
 | 
					
						
							| 
									
										
										
										
											2022-10-06 14:09:21 +00:00
										 |  |  |       - ./style:/style
 | 
					
						
							|  |  |  |       - ./build:/build
 |