kopia lustrzana https://github.com/openmaptiles/openmaptiles
Use `docker-compose up -d` for on-going processes (#1353)
Make targets `start-tileserver`, `start-maputnik`, and `update-osm` initialize on-going processes rather than perform a one-time task. It is more appropriate to execute them using `docker-compose up -d`. With the current `docker-compose run` execution, the user needs to run `make` as a background process. This PR also allows the use of `docker-compose logs` rather than the need to handle `stdout` and `stderr` redirection and avoids the dependency of `stdin` handling for `docker-compose run` Using `docker-compose` rather than `docker` Use appropriate` start-*` and `stop-*` make target names Resolves #1352planetiler
rodzic
b13ab9491f
commit
b0e7f7884c
22
Makefile
22
Makefile
|
@ -172,9 +172,11 @@ Hints for testing areas
|
||||||
|
|
||||||
Hints for designers:
|
Hints for designers:
|
||||||
make start-maputnik # start Maputnik Editor + dynamic tile server [ see $(OMT_HOST):8088 ]
|
make start-maputnik # start Maputnik Editor + dynamic tile server [ see $(OMT_HOST):8088 ]
|
||||||
|
make stop-maputnik # stop Maputnik Editor + dynamic tile server
|
||||||
make start-postserve # start dynamic tile server [ see $(OMT_HOST):$(PPORT) ]
|
make start-postserve # start dynamic tile server [ see $(OMT_HOST):$(PPORT) ]
|
||||||
make stop-postserve # stop dynamic tile server
|
make stop-postserve # stop dynamic tile server
|
||||||
make start-tileserver # start maptiler/tileserver-gl [ see $(OMT_HOST):$(TPORT) ]
|
make start-tileserver # start maptiler/tileserver-gl [ see $(OMT_HOST):$(TPORT) ]
|
||||||
|
make stop-tileserver # stop maptiler/tileserver-gl
|
||||||
|
|
||||||
Hints for developers:
|
Hints for developers:
|
||||||
make # build source code
|
make # build source code
|
||||||
|
@ -395,10 +397,14 @@ import-osm: all start-db-nowait
|
||||||
@$(assert_area_is_given)
|
@$(assert_area_is_given)
|
||||||
$(DOCKER_COMPOSE) $(DC_CONFIG_CACHE) run $(DC_OPTS_CACHE) openmaptiles-tools sh -c 'pgwait && import-osm $(PBF_FILE)'
|
$(DOCKER_COMPOSE) $(DC_CONFIG_CACHE) run $(DC_OPTS_CACHE) openmaptiles-tools sh -c 'pgwait && import-osm $(PBF_FILE)'
|
||||||
|
|
||||||
.PHONY: update-osm
|
.PHONY: start-update-osm
|
||||||
update-osm: all start-db-nowait
|
start-update-osm: all start-db
|
||||||
@$(assert_area_is_given)
|
@$(assert_area_is_given)
|
||||||
$(DOCKER_COMPOSE) $(DC_CONFIG_CACHE) run $(DC_OPTS_CACHE) openmaptiles-tools sh -c 'pgwait && import-update'
|
$(DOCKER_COMPOSE) $(DC_CONFIG_CACHE) up -d update-osm
|
||||||
|
|
||||||
|
.PHONY: stop-update-osm
|
||||||
|
stop-update-osm:
|
||||||
|
$(DOCKER_COMPOSE) stop update-osm
|
||||||
|
|
||||||
.PHONY: import-diff
|
.PHONY: import-diff
|
||||||
import-diff: all start-db-nowait
|
import-diff: all start-db-nowait
|
||||||
|
@ -454,7 +460,11 @@ start-tileserver: init-dirs
|
||||||
@echo "* "
|
@echo "* "
|
||||||
@echo "***********************************************************"
|
@echo "***********************************************************"
|
||||||
@echo " "
|
@echo " "
|
||||||
docker run $(DC_OPTS) -it --name tileserver-gl -v $$(pwd)/data:/data -p $(TPORT):$(TPORT) maptiler/tileserver-gl --port $(TPORT)
|
$(DOCKER_COMPOSE) up -d tileserver-gl
|
||||||
|
|
||||||
|
.PHONY: stop-tileserver
|
||||||
|
stop-tileserver:
|
||||||
|
$(DOCKER_COMPOSE) stop tileserver-gl
|
||||||
|
|
||||||
.PHONY: start-postserve
|
.PHONY: start-postserve
|
||||||
start-postserve: start-db
|
start-postserve: start-db
|
||||||
|
@ -486,11 +496,11 @@ start-maputnik: stop-maputnik start-postserve
|
||||||
@echo "* "
|
@echo "* "
|
||||||
@echo "***********************************************************"
|
@echo "***********************************************************"
|
||||||
@echo " "
|
@echo " "
|
||||||
docker run $(DC_OPTS) --name maputnik_editor -d -p 8088:8888 maputnik/editor
|
$(DOCKER_COMPOSE) up -d maputnik_editor
|
||||||
|
|
||||||
.PHONY: stop-maputnik
|
.PHONY: stop-maputnik
|
||||||
stop-maputnik:
|
stop-maputnik:
|
||||||
-docker rm -f maputnik_editor
|
-$(DOCKER_COMPOSE) stop maputnik_editor
|
||||||
|
|
||||||
# STAT_FUNCTION=frequency|toplength|variance
|
# STAT_FUNCTION=frequency|toplength|variance
|
||||||
.PHONY: generate-qa
|
.PHONY: generate-qa
|
||||||
|
|
|
@ -27,7 +27,7 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- postgres
|
- postgres
|
||||||
|
|
||||||
openmaptiles-tools:
|
openmaptiles-tools: &openmaptiles-tools
|
||||||
image: "openmaptiles/openmaptiles-tools:${TOOLS_VERSION}"
|
image: "openmaptiles/openmaptiles-tools:${TOOLS_VERSION}"
|
||||||
env_file: .env
|
env_file: .env
|
||||||
environment:
|
environment:
|
||||||
|
@ -54,6 +54,10 @@ services:
|
||||||
- ./build:/mapping
|
- ./build:/mapping
|
||||||
- ./cache:/cache
|
- ./cache:/cache
|
||||||
|
|
||||||
|
update-osm:
|
||||||
|
<<: *openmaptiles-tools
|
||||||
|
command: import-update
|
||||||
|
|
||||||
generate-changed-vectortiles:
|
generate-changed-vectortiles:
|
||||||
image: "openmaptiles/generate-vectortiles:${TOOLS_VERSION}"
|
image: "openmaptiles/generate-vectortiles:${TOOLS_VERSION}"
|
||||||
command: ./export-list.sh
|
command: ./export-list.sh
|
||||||
|
@ -97,3 +101,18 @@ services:
|
||||||
- "${PPORT:-8090}:${PPORT:-8090}"
|
- "${PPORT:-8090}:${PPORT:-8090}"
|
||||||
volumes:
|
volumes:
|
||||||
- .:/tileset
|
- .:/tileset
|
||||||
|
|
||||||
|
maputnik_editor:
|
||||||
|
image: "maputnik/editor"
|
||||||
|
ports:
|
||||||
|
- "8088:8888"
|
||||||
|
|
||||||
|
tileserver-gl:
|
||||||
|
image: "maptiler/tileserver-gl"
|
||||||
|
command:
|
||||||
|
- --port
|
||||||
|
- "${TPORT:-8080}"
|
||||||
|
ports:
|
||||||
|
- "${TPORT:-8080}:${TPORT:-8080}"
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
|
Ładowanie…
Reference in New Issue