Compare commits

2 Commits

Author SHA1 Message Date
0cee7fd6fc Make DC User and Password configurable 2020-07-01 14:45:12 +02:00
5208f1adbd Make DC User and Password configurable 2020-07-01 14:41:18 +02:00

View File

@@ -6,6 +6,9 @@ SHELL = /bin/bash
# Containers run as the current user rather than root (so that created files are not root-owned) # Containers run as the current user rather than root (so that created files are not root-owned)
DC_OPTS?=--rm -u $(shell id -u):$(shell id -g) DC_OPTS?=--rm -u $(shell id -u):$(shell id -g)
DC_USER?="openmaptiles"
DC_PASSWORD?="openmaptiles"
# If set to a non-empty value, will use postgis-preloaded instead of postgis docker image # If set to a non-empty value, will use postgis-preloaded instead of postgis docker image
USE_PRELOADED_IMAGE?= USE_PRELOADED_IMAGE?=
@@ -101,7 +104,7 @@ init-dirs:
build/openmaptiles.tm2source/data.yml: init-dirs build/openmaptiles.tm2source/data.yml: init-dirs
mkdir -p build/openmaptiles.tm2source mkdir -p build/openmaptiles.tm2source
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools generate-tm2source openmaptiles.yaml --host="postgres" --port=5432 --database="openmaptiles" --user="openmaptiles" --password="openmaptiles" > $@ $(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools generate-tm2source openmaptiles.yaml --host="postgres" --port=5432 --database="openmaptiles" --user="$(DC_USER)" --password="$(DC_PASSWORD)" > $@
build/mapping.yaml: init-dirs build/mapping.yaml: init-dirs
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools generate-imposm3 openmaptiles.yaml > $@ $(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools generate-imposm3 openmaptiles.yaml > $@