From 5a525e64c3bc1b04d4fb9d57aed5861ea34a0219 Mon Sep 17 00:00:00 2001 From: lukasmartinelli Date: Mon, 10 Oct 2016 20:39:55 +0200 Subject: [PATCH] Hacky workflow to work together with omtgen.py, imposm3 and import schema --- docker-compose.yml | 2 +- schema/Dockerfile | 2 +- schema/create_schema.sh | 11 +---------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e3b58d3..f249698 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,7 +21,7 @@ services: - postgres volumes: - ./data:/import - - ./ClearTables:/opt/cleartables + - ./:/mapping import-natural-earth: image: "osm2vectortiles/import-natural-earth" env_file: .env diff --git a/schema/Dockerfile b/schema/Dockerfile index 363c445..83d9520 100644 --- a/schema/Dockerfile +++ b/schema/Dockerfile @@ -11,7 +11,7 @@ ENV VT_UTIL_DIR=/opt/postgis-vt-util \ RUN mkdir -p "$VT_UTIL_DIR" \ && wget -P "$VT_UTIL_DIR" --quiet "$VT_UTIL_URL" - +ENV GENERATED_SQL_FILE=/usr/src/app/gen.sql COPY . /usr/src/app/ WORKDIR /usr/src/app CMD ["./create_schema.sh"] diff --git a/schema/create_schema.sh b/schema/create_schema.sh index ba749f9..76a66dc 100755 --- a/schema/create_schema.sh +++ b/schema/create_schema.sh @@ -16,16 +16,7 @@ function exec_psql_file() { function main() { exec_psql_file "$VT_UTIL_DIR/postgis-vt-util.sql" - exec_psql_file "layers/water.sql" - exec_psql_file "layers/building.sql" - exec_psql_file "layers/boundary.sql" - exec_psql_file "layers/road.sql" - exec_psql_file "layers/ice.sql" - exec_psql_file "layers/urban.sql" - exec_psql_file "layers/place.sql" - exec_psql_file "layers/country.sql" - exec_psql_file "layers/state.sql" - exec_psql_file "layers/rail.sql" + exec_psql_file "$GENERATED_SQL_FILE" } main