2020-05-04 20:41:55 +00:00
|
|
|
# Ensure that errors don't hide inside pipes
|
|
|
|
SHELL = /bin/bash
|
|
|
|
.SHELLFLAGS = -o pipefail -c
|
|
|
|
|
2019-12-11 14:26:25 +00:00
|
|
|
# Options to run with docker and docker-compose - ensure the container is destroyed on exit
|
2020-03-06 18:15:54 +00:00
|
|
|
# Containers run as the current user rather than root (so that created files are not root-owned)
|
2020-04-21 17:36:07 +00:00
|
|
|
DC_OPTS?=--rm -u $(shell id -u):$(shell id -g)
|
2019-12-12 17:40:31 +00:00
|
|
|
|
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
|
|
|
# If set to a non-empty value, will use postgis-preloaded instead of postgis docker image
|
|
|
|
USE_PRELOADED_IMAGE?=
|
|
|
|
|
2020-05-06 15:27:14 +00:00
|
|
|
# If set, this file will be imported in the import-osm target
|
|
|
|
PBF_FILE?=
|
|
|
|
|
2020-04-09 16:05:01 +00:00
|
|
|
# Allow a custom docker-compose project name
|
|
|
|
ifeq ($(strip $(DC_PROJECT)),)
|
|
|
|
override DC_PROJECT:=$(notdir $(shell pwd))
|
2020-04-21 17:36:07 +00:00
|
|
|
DOCKER_COMPOSE:= docker-compose
|
|
|
|
else
|
|
|
|
DOCKER_COMPOSE:= docker-compose --project-name $(DC_PROJECT)
|
2020-04-09 16:05:01 +00:00
|
|
|
endif
|
|
|
|
|
2020-04-24 20:44:02 +00:00
|
|
|
# Make some operations quieter (e.g. inside the test script)
|
|
|
|
ifeq ($(strip $(QUIET)),)
|
|
|
|
QUIET_FLAG:=
|
|
|
|
else
|
|
|
|
QUIET_FLAG:=--quiet
|
|
|
|
endif
|
|
|
|
|
2020-04-09 16:05:01 +00:00
|
|
|
# Use `xargs --no-run-if-empty` flag, if supported
|
|
|
|
XARGS:=xargs $(shell xargs --no-run-if-empty </dev/null 2>/dev/null && echo --no-run-if-empty)
|
|
|
|
|
2019-12-16 13:37:34 +00:00
|
|
|
# If running in the test mode, compare files rather than copy them
|
|
|
|
TEST_MODE?=no
|
|
|
|
ifeq ($(TEST_MODE),yes)
|
2020-01-23 02:55:22 +00:00
|
|
|
# create images in ./build/devdoc and compare them to ./layers
|
|
|
|
GRAPH_PARAMS=./build/devdoc ./layers
|
2019-12-16 13:37:34 +00:00
|
|
|
else
|
2020-01-23 02:55:22 +00:00
|
|
|
# update graphs in the ./layers dir
|
|
|
|
GRAPH_PARAMS=./layers
|
2019-12-16 13:37:34 +00:00
|
|
|
endif
|
|
|
|
|
2019-12-11 14:26:25 +00:00
|
|
|
.PHONY: all
|
2020-05-20 15:27:42 +00:00
|
|
|
all: init-dirs build/openmaptiles.tm2source/data.yml build/mapping.yaml build-sql
|
2016-10-28 19:56:39 +00:00
|
|
|
|
2020-04-21 17:36:07 +00:00
|
|
|
# Set OpenMapTiles host
|
|
|
|
OMT_HOST:=http://$(firstword $(subst :, ,$(subst tcp://,,$(DOCKER_HOST))) localhost)
|
|
|
|
|
2019-12-11 14:26:25 +00:00
|
|
|
.PHONY: help
|
2016-11-30 04:39:06 +00:00
|
|
|
help:
|
|
|
|
@echo "=============================================================================="
|
|
|
|
@echo " OpenMapTiles https://github.com/openmaptiles/openmaptiles "
|
|
|
|
@echo "Hints for testing areas "
|
2020-04-09 14:49:35 +00:00
|
|
|
@echo " make list-geofabrik # list actual geofabrik OSM extracts for download -> <<your-area>> "
|
2016-11-30 04:39:06 +00:00
|
|
|
@echo " ./quickstart.sh <<your-area>> # example: ./quickstart.sh madagascar "
|
2020-04-09 14:49:35 +00:00
|
|
|
@echo " "
|
2016-11-30 04:39:06 +00:00
|
|
|
@echo "Hints for designers:"
|
2020-05-09 17:30:57 +00:00
|
|
|
@echo " make start-maputnik # start Maputnik Editor + dynamic tile server [ see $(OMT_HOST):8088 ]"
|
|
|
|
@echo " make start-postserve # start dynamic tile server [ see $(OMT_HOST):8090 ]"
|
|
|
|
@echo " make start-tileserver # start maptiler/tileserver-gl [ see $(OMT_HOST):8080 ]"
|
2020-04-09 14:49:35 +00:00
|
|
|
@echo " "
|
2016-11-30 04:39:06 +00:00
|
|
|
@echo "Hints for developers:"
|
2018-10-12 07:46:09 +00:00
|
|
|
@echo " make # build source code"
|
2020-04-09 14:49:35 +00:00
|
|
|
@echo " make list-geofabrik # list actual geofabrik OSM extracts for download"
|
2020-04-21 17:36:07 +00:00
|
|
|
@echo " make download-geofabrik area=albania # download OSM data from geofabrik, and create config file"
|
|
|
|
@echo " make download-osmfr area=asia/qatar # download OSM data from openstreetmap.fr, and create config file"
|
|
|
|
@echo " make download-bbike area=Amsterdam # download OSM data from bbike.org, and create config file"
|
2018-10-12 07:46:09 +00:00
|
|
|
@echo " make psql # start PostgreSQL console"
|
|
|
|
@echo " make psql-list-tables # list all PostgreSQL tables"
|
2020-05-09 17:30:57 +00:00
|
|
|
@echo " make vacuum-db # PostgreSQL: VACUUM ANALYZE"
|
|
|
|
@echo " make analyze-db # PostgreSQL: ANALYZE"
|
2020-04-21 17:36:07 +00:00
|
|
|
@echo " make generate-qareports # generate reports [./build/qareports]"
|
|
|
|
@echo " make generate-devdoc # generate devdoc including graphs for all layers [./layers/...]"
|
2020-05-09 17:30:57 +00:00
|
|
|
@echo " make bash # start openmaptiles-tools /bin/bash terminal"
|
|
|
|
@echo " make destroy-db # remove docker containers and PostgreSQL data volume"
|
|
|
|
@echo " make start-db # start PostgreSQL, creating it if it doesn't exist"
|
|
|
|
@echo " make start-db-preloaded # start PostgreSQL, creating data-prepopulated one if it doesn't exist"
|
|
|
|
@echo " make stop-db # stop PostgreSQL database without destroying the data"
|
|
|
|
@echo " make clean-unnecessary-docker # clean unnecessary docker image(s) and container(s)"
|
2016-11-30 04:39:06 +00:00
|
|
|
@echo " make refresh-docker-images # refresh openmaptiles docker images from Docker HUB"
|
|
|
|
@echo " make remove-docker-images # remove openmaptiles docker images"
|
|
|
|
@echo " make pgclimb-list-views # list PostgreSQL public schema views"
|
2018-10-12 07:46:09 +00:00
|
|
|
@echo " make pgclimb-list-tables # list PostgreSQL public schema tables"
|
|
|
|
@echo " cat .env # list PG database and MIN_ZOOM and MAX_ZOOM information"
|
2020-04-21 17:36:07 +00:00
|
|
|
@echo " cat quickstart.log # transcript of the last ./quickstart.sh run"
|
2018-10-12 07:46:09 +00:00
|
|
|
@echo " make help # help about available commands"
|
2016-11-30 04:39:06 +00:00
|
|
|
@echo "=============================================================================="
|
|
|
|
|
2020-03-06 18:15:54 +00:00
|
|
|
.PHONY: init-dirs
|
|
|
|
init-dirs:
|
2020-05-18 18:26:51 +00:00
|
|
|
@mkdir -p build/sql
|
2020-04-22 06:48:57 +00:00
|
|
|
@mkdir -p data
|
|
|
|
@mkdir -p cache
|
2016-10-23 15:36:48 +00:00
|
|
|
|
2020-03-06 18:15:54 +00:00
|
|
|
build/openmaptiles.tm2source/data.yml: init-dirs
|
2019-03-29 21:15:42 +00:00
|
|
|
mkdir -p build/openmaptiles.tm2source
|
2020-04-09 16:05:01 +00:00
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools generate-tm2source openmaptiles.yaml --host="postgres" --port=5432 --database="openmaptiles" --user="openmaptiles" --password="openmaptiles" > $@
|
2016-10-23 15:36:48 +00:00
|
|
|
|
2020-03-06 18:15:54 +00:00
|
|
|
build/mapping.yaml: init-dirs
|
2020-04-09 16:05:01 +00:00
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools generate-imposm3 openmaptiles.yaml > $@
|
2019-03-22 08:34:00 +00:00
|
|
|
|
2020-04-22 15:15:20 +00:00
|
|
|
.PHONY: build-sql
|
|
|
|
build-sql: init-dirs
|
2020-05-18 18:26:51 +00:00
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools generate-sql openmaptiles.yaml --dir ./build/sql
|
2016-10-23 15:36:48 +00:00
|
|
|
|
2019-12-11 14:26:25 +00:00
|
|
|
.PHONY: clean
|
2016-10-23 15:36:48 +00:00
|
|
|
clean:
|
2020-03-06 18:15:54 +00:00
|
|
|
rm -rf build
|
2016-11-27 10:31:43 +00:00
|
|
|
|
2020-05-09 17:30:57 +00:00
|
|
|
.PHONY: destroy-db
|
|
|
|
destroy-db: override DC_PROJECT:=$(shell echo $(DC_PROJECT) | tr A-Z a-z)
|
|
|
|
destroy-db:
|
2020-04-09 16:05:01 +00:00
|
|
|
$(DOCKER_COMPOSE) down -v --remove-orphans
|
|
|
|
$(DOCKER_COMPOSE) rm -fv
|
2020-04-24 18:38:36 +00:00
|
|
|
docker volume ls -q -f "name=^$(DC_PROJECT)_" | $(XARGS) docker volume rm
|
2020-03-06 18:15:54 +00:00
|
|
|
rm -rf cache
|
2016-11-28 22:15:47 +00:00
|
|
|
|
2020-05-09 17:30:57 +00:00
|
|
|
.PHONY: start-db-nowait
|
2020-05-20 15:27:42 +00:00
|
|
|
start-db-nowait: init-dirs
|
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
|
|
|
@echo "Starting postgres docker compose target using $${POSTGIS_IMAGE:-default} image (no recreate if exists)" && \
|
2020-04-22 06:48:57 +00:00
|
|
|
$(DOCKER_COMPOSE) up --no-recreate -d postgres
|
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
|
|
|
|
2020-05-09 17:30:57 +00:00
|
|
|
.PHONY: start-db
|
|
|
|
start-db: start-db-nowait
|
2019-12-12 17:40:31 +00:00
|
|
|
@echo "Wait for PostgreSQL to start..."
|
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
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools pgwait
|
|
|
|
|
2020-05-09 17:30:57 +00:00
|
|
|
# Wrap start-db target but use the preloaded image
|
|
|
|
.PHONY: start-db-preloaded
|
|
|
|
start-db-preloaded: export POSTGIS_IMAGE=openmaptiles/postgis-preloaded
|
|
|
|
start-db-preloaded: start-db
|
2017-01-20 22:30:02 +00:00
|
|
|
|
2020-05-09 17:30:57 +00:00
|
|
|
.PHONY: stop-db
|
|
|
|
stop-db:
|
2020-04-22 06:48:57 +00:00
|
|
|
@echo "Stopping PostgreSQL..."
|
2020-04-09 16:05:01 +00:00
|
|
|
$(DOCKER_COMPOSE) stop postgres
|
2020-03-06 18:15:54 +00:00
|
|
|
|
2020-04-22 15:15:20 +00:00
|
|
|
.PHONY: list-geofabrik
|
2020-05-20 15:27:42 +00:00
|
|
|
list-geofabrik: init-dirs
|
2020-04-22 15:15:20 +00:00
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools download-osm list geofabrik
|
|
|
|
|
2020-04-21 17:36:07 +00:00
|
|
|
OSM_SERVERS:=geofabrik osmfr bbbike
|
|
|
|
ALL_DOWNLOADS:=$(addprefix download-,$(OSM_SERVERS))
|
|
|
|
OSM_SERVER=$(patsubst download-%,%,$@)
|
|
|
|
.PHONY: $(ALL_DOWNLOADS)
|
|
|
|
$(ALL_DOWNLOADS): init-dirs
|
|
|
|
ifeq ($(strip $(area)),)
|
|
|
|
@echo ""
|
|
|
|
@echo "ERROR: Unable to download an area if area is not given."
|
|
|
|
@echo "Usage:"
|
|
|
|
@echo " make download-$(OSM_SERVER) area=<area-id>"
|
|
|
|
@echo ""
|
|
|
|
$(if $(filter %-geofabrik,$@),@echo "Use make list-geofabrik to get a list of all available areas";echo "")
|
|
|
|
@exit 1
|
|
|
|
else
|
|
|
|
@echo "=============== download-$(OSM_SERVER) ======================="
|
|
|
|
@echo "Download area: $(area)"
|
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools bash -c \
|
|
|
|
'download-osm $(OSM_SERVER) $(area) \
|
|
|
|
--minzoom $$QUICKSTART_MIN_ZOOM \
|
|
|
|
--maxzoom $$QUICKSTART_MAX_ZOOM \
|
|
|
|
--make-dc /import/docker-compose-config.yml -- -d /import'
|
|
|
|
ls -la ./data/$(notdir $(area))*
|
|
|
|
@echo ""
|
|
|
|
endif
|
2016-11-28 23:27:44 +00:00
|
|
|
|
2019-12-11 14:26:25 +00:00
|
|
|
.PHONY: psql
|
2020-05-09 17:30:57 +00:00
|
|
|
psql: start-db-nowait
|
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
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools sh -c 'pgwait && psql.sh'
|
2017-11-10 20:28:12 +00:00
|
|
|
|
2019-12-11 14:26:25 +00:00
|
|
|
.PHONY: import-osm
|
2020-05-09 17:30:57 +00:00
|
|
|
import-osm: all start-db-nowait
|
2020-05-06 15:27:14 +00:00
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools sh -c 'pgwait && import-osm $(PBF_FILE)'
|
2018-01-16 08:53:59 +00:00
|
|
|
|
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
|
|
|
.PHONY: update-osm
|
2020-05-09 17:30:57 +00:00
|
|
|
update-osm: all start-db-nowait
|
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
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools sh -c 'pgwait && import-update'
|
|
|
|
|
|
|
|
.PHONY: import-diff
|
2020-05-09 17:30:57 +00:00
|
|
|
import-diff: all start-db-nowait
|
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
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools sh -c 'pgwait && import-diff'
|
2020-03-06 18:15:54 +00:00
|
|
|
|
2020-04-22 06:48:57 +00:00
|
|
|
.PHONY: import-data
|
2020-05-09 17:30:57 +00:00
|
|
|
import-data: start-db
|
2020-04-22 06:48:57 +00:00
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) import-data
|
|
|
|
|
2020-03-06 18:15:54 +00:00
|
|
|
.PHONY: import-borders
|
2020-05-09 17:30:57 +00:00
|
|
|
import-borders: start-db-nowait
|
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
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools sh -c 'pgwait && import-borders'
|
2020-03-06 18:15:54 +00:00
|
|
|
|
2020-04-22 15:15:20 +00:00
|
|
|
.PHONY: import-sql
|
2020-05-09 17:30:57 +00:00
|
|
|
import-sql: all start-db-nowait
|
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
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools sh -c 'pgwait && import-sql' | \
|
2020-05-04 17:28:23 +00:00
|
|
|
awk -v s=": WARNING:" '$$0~s{print; print "\n*** WARNING detected, aborting"; exit(1)} 1'
|
2018-01-16 08:53:59 +00:00
|
|
|
|
2019-12-11 14:26:25 +00:00
|
|
|
.PHONY: generate-tiles
|
2020-04-21 17:36:07 +00:00
|
|
|
ifneq ($(wildcard data/docker-compose-config.yml),)
|
|
|
|
DC_CONFIG_TILES:=-f docker-compose.yml -f ./data/docker-compose-config.yml
|
|
|
|
endif
|
2020-05-20 15:27:42 +00:00
|
|
|
generate-tiles: all start-db
|
2018-01-16 08:53:59 +00:00
|
|
|
rm -rf data/tiles.mbtiles
|
2020-04-22 15:15:20 +00:00
|
|
|
echo "Generating tiles ..."; \
|
2020-04-21 17:36:07 +00:00
|
|
|
$(DOCKER_COMPOSE) $(DC_CONFIG_TILES) run $(DC_OPTS) generate-vectortiles
|
2020-04-22 15:15:20 +00:00
|
|
|
@echo "Updating generated tile metadata ..."
|
2020-04-09 16:05:01 +00:00
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools generate-metadata ./data/tiles.mbtiles
|
2018-07-27 13:32:44 +00:00
|
|
|
|
2020-05-09 17:30:57 +00:00
|
|
|
.PHONY: start-tileserver
|
|
|
|
start-tileserver: init-dirs
|
2017-01-11 08:46:19 +00:00
|
|
|
@echo " "
|
2017-01-08 12:31:24 +00:00
|
|
|
@echo "***********************************************************"
|
2017-01-11 08:46:19 +00:00
|
|
|
@echo "* "
|
2020-04-21 17:51:03 +00:00
|
|
|
@echo "* Download/refresh maptiler/tileserver-gl docker image"
|
|
|
|
@echo "* see documentation: https://github.com/maptiler/tileserver-gl"
|
2017-01-11 08:46:19 +00:00
|
|
|
@echo "* "
|
2017-01-08 12:31:24 +00:00
|
|
|
@echo "***********************************************************"
|
2017-01-11 08:46:19 +00:00
|
|
|
@echo " "
|
2020-04-21 17:51:03 +00:00
|
|
|
docker pull maptiler/tileserver-gl
|
2017-01-11 08:46:19 +00:00
|
|
|
@echo " "
|
2017-01-08 12:31:24 +00:00
|
|
|
@echo "***********************************************************"
|
2017-01-11 08:46:19 +00:00
|
|
|
@echo "* "
|
2020-04-21 17:51:03 +00:00
|
|
|
@echo "* Start maptiler/tileserver-gl "
|
2020-04-21 17:36:07 +00:00
|
|
|
@echo "* ----------------------------> check $(OMT_HOST):8080 "
|
2017-01-11 08:46:19 +00:00
|
|
|
@echo "* "
|
2017-01-08 12:31:24 +00:00
|
|
|
@echo "***********************************************************"
|
|
|
|
@echo " "
|
2020-04-22 06:47:33 +00:00
|
|
|
docker run $(DC_OPTS) -it --name tileserver-gl -v $$(pwd)/data:/data -p 8080:8080 maptiler/tileserver-gl --port 8080
|
2018-07-27 13:32:44 +00:00
|
|
|
|
2020-05-09 17:30:57 +00:00
|
|
|
.PHONY: start-postserve
|
|
|
|
start-postserve: start-db
|
2018-07-27 13:32:44 +00:00
|
|
|
@echo " "
|
|
|
|
@echo "***********************************************************"
|
|
|
|
@echo "* "
|
2020-04-21 17:36:07 +00:00
|
|
|
@echo "* Bring up postserve at $(OMT_HOST):8090"
|
2020-05-09 17:30:57 +00:00
|
|
|
@echo "* --> can view it locally (use make start-maputnik)"
|
2020-04-22 15:15:20 +00:00
|
|
|
@echo "* --> or can use https://maputnik.github.io/editor"
|
|
|
|
@echo "* "
|
2020-05-14 21:59:12 +00:00
|
|
|
@echo "* set data source / TileJSON URL to $(OMT_HOST):8090"
|
2018-07-27 13:32:44 +00:00
|
|
|
@echo "* "
|
|
|
|
@echo "***********************************************************"
|
|
|
|
@echo " "
|
2020-04-09 16:05:01 +00:00
|
|
|
$(DOCKER_COMPOSE) up -d postserve
|
2020-04-22 15:15:20 +00:00
|
|
|
|
2020-05-09 17:30:57 +00:00
|
|
|
.PHONY: stop-postserve
|
|
|
|
stop-postserve:
|
2020-04-22 15:15:20 +00:00
|
|
|
$(DOCKER_COMPOSE) stop postserve
|
|
|
|
|
2020-05-09 17:30:57 +00:00
|
|
|
.PHONY: start-maputnik
|
|
|
|
start-maputnik: stop-maputnik start-postserve
|
2018-07-27 13:32:44 +00:00
|
|
|
@echo " "
|
|
|
|
@echo "***********************************************************"
|
|
|
|
@echo "* "
|
|
|
|
@echo "* Start maputnik/editor "
|
2020-05-15 04:08:37 +00:00
|
|
|
@echo "* ---> go to $(OMT_HOST):8088 "
|
2020-05-14 21:59:12 +00:00
|
|
|
@echo "* ---> set data source / TileJSON URL to $(OMT_HOST):8090"
|
2018-07-27 13:32:44 +00:00
|
|
|
@echo "* "
|
|
|
|
@echo "***********************************************************"
|
|
|
|
@echo " "
|
2019-12-11 14:26:25 +00:00
|
|
|
docker run $(DC_OPTS) --name maputnik_editor -d -p 8088:8888 maputnik/editor
|
2018-07-27 13:32:44 +00:00
|
|
|
|
2020-05-09 17:30:57 +00:00
|
|
|
.PHONY: stop-maputnik
|
|
|
|
stop-maputnik:
|
2020-04-22 15:15:20 +00:00
|
|
|
-docker rm -f maputnik_editor
|
|
|
|
|
2019-12-11 14:26:25 +00:00
|
|
|
.PHONY: generate-qareports
|
2020-05-09 17:30:57 +00:00
|
|
|
generate-qareports: start-db
|
2016-12-04 00:37:28 +00:00
|
|
|
./qa/run.sh
|
|
|
|
|
2019-03-29 21:15:42 +00:00
|
|
|
# generate all etl and mapping graphs
|
2020-01-23 02:55:22 +00:00
|
|
|
.PHONY: generate-devdoc
|
2020-03-06 18:15:54 +00:00
|
|
|
generate-devdoc: init-dirs
|
2020-01-23 02:55:22 +00:00
|
|
|
mkdir -p ./build/devdoc && \
|
2020-04-22 06:48:57 +00:00
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools sh -c \
|
2020-01-23 02:55:22 +00:00
|
|
|
'generate-etlgraph openmaptiles.yaml $(GRAPH_PARAMS) && \
|
|
|
|
generate-mapping-graph openmaptiles.yaml $(GRAPH_PARAMS)'
|
2018-07-27 07:53:39 +00:00
|
|
|
|
2020-05-09 17:30:57 +00:00
|
|
|
.PHONY: bash
|
2020-05-20 15:27:42 +00:00
|
|
|
bash: init-dirs
|
2020-04-09 16:05:01 +00:00
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools bash
|
2018-07-27 07:53:39 +00:00
|
|
|
|
2020-01-22 21:16:38 +00:00
|
|
|
.PHONY: import-wikidata
|
2020-05-20 15:27:42 +00:00
|
|
|
import-wikidata: init-dirs
|
2020-04-22 15:15:20 +00:00
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools import-wikidata --cache /cache/wikidata-cache.json openmaptiles.yaml
|
2018-07-27 13:32:44 +00:00
|
|
|
|
2020-05-09 17:30:57 +00:00
|
|
|
.PHONY: reset-db-stats
|
2020-05-20 15:27:42 +00:00
|
|
|
reset-db-stats: init-dirs
|
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
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools psql.sh -v ON_ERROR_STOP=1 -P pager=off -c 'SELECT pg_stat_statements_reset();'
|
2020-03-06 18:15:54 +00:00
|
|
|
|
|
|
|
.PHONY: list-views
|
2020-05-20 15:27:42 +00:00
|
|
|
list-views: init-dirs
|
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
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools psql.sh -v ON_ERROR_STOP=1 -A -F"," -P pager=off -P footer=off \
|
2020-03-06 18:15:54 +00:00
|
|
|
-c "select schemaname, viewname from pg_views where schemaname='public' order by viewname;"
|
|
|
|
|
|
|
|
.PHONY: list-tables
|
2020-05-20 15:27:42 +00:00
|
|
|
list-tables: init-dirs
|
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
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools psql.sh -v ON_ERROR_STOP=1 -A -F"," -P pager=off -P footer=off \
|
2020-03-06 18:15:54 +00:00
|
|
|
-c "select schemaname, tablename from pg_tables where schemaname='public' order by tablename;"
|
2018-07-27 13:32:44 +00:00
|
|
|
|
2020-03-06 18:15:54 +00:00
|
|
|
.PHONY: psql-list-tables
|
2020-05-20 15:27:42 +00:00
|
|
|
psql-list-tables: init-dirs
|
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
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools psql.sh -v ON_ERROR_STOP=1 -P pager=off -c "\d+"
|
2018-07-27 13:32:44 +00:00
|
|
|
|
2020-05-09 17:30:57 +00:00
|
|
|
.PHONY: vacuum-db
|
2020-05-20 15:27:42 +00:00
|
|
|
vacuum-db: init-dirs
|
2018-07-27 13:32:44 +00:00
|
|
|
@echo "Start - postgresql: VACUUM ANALYZE VERBOSE;"
|
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
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools psql.sh -v ON_ERROR_STOP=1 -P pager=off -c 'VACUUM ANALYZE VERBOSE;'
|
2018-07-27 13:32:44 +00:00
|
|
|
|
2020-05-09 17:30:57 +00:00
|
|
|
.PHONY: analyze-db
|
2020-05-20 15:27:42 +00:00
|
|
|
analyze-db: init-dirs
|
2020-03-06 18:15:54 +00:00
|
|
|
@echo "Start - postgresql: ANALYZE VERBOSE;"
|
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
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools psql.sh -v ON_ERROR_STOP=1 -P pager=off -c 'ANALYZE VERBOSE;'
|
2018-07-27 13:32:44 +00:00
|
|
|
|
2019-12-11 14:26:25 +00:00
|
|
|
.PHONY: list-docker-images
|
2018-07-27 13:32:44 +00:00
|
|
|
list-docker-images:
|
|
|
|
docker images | grep openmaptiles
|
|
|
|
|
2019-12-11 14:26:25 +00:00
|
|
|
.PHONY: refresh-docker-images
|
2020-05-20 15:27:42 +00:00
|
|
|
refresh-docker-images: init-dirs
|
2020-04-22 18:55:13 +00:00
|
|
|
ifneq ($(strip $(NO_REFRESH)),)
|
|
|
|
@echo "Skipping docker image refresh"
|
|
|
|
else
|
|
|
|
@echo ""
|
|
|
|
@echo "Refreshing docker images... Use NO_REFRESH=1 to skip."
|
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
|
|
|
ifneq ($(strip $(USE_PRELOADED_IMAGE)),)
|
|
|
|
POSTGIS_IMAGE=openmaptiles/postgis-preloaded \
|
|
|
|
docker-compose pull --ignore-pull-failures $(QUIET_FLAG) openmaptiles-tools generate-vectortiles postgres
|
|
|
|
else
|
|
|
|
docker-compose pull --ignore-pull-failures $(QUIET_FLAG) openmaptiles-tools generate-vectortiles postgres import-data
|
|
|
|
endif
|
2020-04-22 18:55:13 +00:00
|
|
|
endif
|
2018-07-27 13:32:44 +00:00
|
|
|
|
2019-12-11 14:26:25 +00:00
|
|
|
.PHONY: remove-docker-images
|
2018-07-27 13:32:44 +00:00
|
|
|
remove-docker-images:
|
|
|
|
@echo "Deleting all openmaptiles related docker image(s)..."
|
2020-04-09 16:05:01 +00:00
|
|
|
@$(DOCKER_COMPOSE) down
|
2020-04-21 17:36:07 +00:00
|
|
|
@docker images "openmaptiles/*" -q | $(XARGS) docker rmi -f
|
|
|
|
@docker images "maputnik/editor" -q | $(XARGS) docker rmi -f
|
2020-04-21 17:51:03 +00:00
|
|
|
@docker images "maptiler/tileserver-gl" -q | $(XARGS) docker rmi -f
|
2018-07-27 13:32:44 +00:00
|
|
|
|
2020-05-09 17:30:57 +00:00
|
|
|
.PHONY: clean-unnecessary-docker
|
|
|
|
clean-unnecessary-docker:
|
2018-07-27 13:32:44 +00:00
|
|
|
@echo "Deleting unnecessary container(s)..."
|
2020-04-09 16:05:01 +00:00
|
|
|
@docker ps -a --filter "status=exited" | $(XARGS) docker rm
|
2018-07-27 13:32:44 +00:00
|
|
|
@echo "Deleting unnecessary image(s)..."
|
2020-04-09 16:05:01 +00:00
|
|
|
@docker images | grep \<none\> | awk -F" " '{print $$3}' | $(XARGS) docker rmi
|
2020-04-09 14:49:35 +00:00
|
|
|
|
|
|
|
.PHONY: test-perf-null
|
2020-05-20 15:27:42 +00:00
|
|
|
test-perf-null: init-dirs
|
2020-04-09 16:05:01 +00:00
|
|
|
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools test-perf openmaptiles.yaml --test null --no-color
|
2020-05-06 15:36:15 +00:00
|
|
|
|
|
|
|
.PHONY: build-test-pbf
|
2020-05-20 15:27:42 +00:00
|
|
|
build-test-pbf: init-dirs
|
2020-05-06 15:36:15 +00:00
|
|
|
docker-compose run $(DC_OPTS) openmaptiles-tools /tileset/.github/workflows/build-test-data.sh
|