From 0beb0b6679d23fa2203c151e504a1048dd340c89 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 30 Sep 2020 16:36:40 +0200 Subject: [PATCH 1/6] feat(addAustria): added Austria to projects --- projects/austria/.env | 3 + projects/austria/README.md | 32 ++++++++ projects/austria/docker-compose.yml | 112 ++++++++++++++++++++++++++++ projects/austria/elasticsearch.yml | 4 + projects/austria/pelias.json | 66 ++++++++++++++++ projects/portland-metro/.env | 4 +- 6 files changed, 219 insertions(+), 2 deletions(-) create mode 100644 projects/austria/.env create mode 100644 projects/austria/README.md create mode 100644 projects/austria/docker-compose.yml create mode 100644 projects/austria/elasticsearch.yml create mode 100644 projects/austria/pelias.json diff --git a/projects/austria/.env b/projects/austria/.env new file mode 100644 index 00000000..bf30c82c --- /dev/null +++ b/projects/austria/.env @@ -0,0 +1,3 @@ +COMPOSE_PROJECT_NAME=pelias +DATA_DIR=./data +DOCKER_USER=0 diff --git a/projects/austria/README.md b/projects/austria/README.md new file mode 100644 index 00000000..7c381de5 --- /dev/null +++ b/projects/austria/README.md @@ -0,0 +1,32 @@ +# Belgium area + +This project is configured to download/prepare/build a complete Pelias installation for Belgium. + +# Setup + +Please refer to the instructions at in order to install and configure your docker environment. + +The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment). + +Please ensure that's all working fine before continuing. + +# Run a Build + +To run a complete build, execute the following commands: + +```bash +pelias compose pull +pelias elastic start +pelias elastic wait +pelias elastic create +pelias download all +pelias prepare all +pelias import all +pelias compose up +``` + +# Make an Example Query + +You can now make queries against your new Pelias build: + + diff --git a/projects/austria/docker-compose.yml b/projects/austria/docker-compose.yml new file mode 100644 index 00000000..8ffc4b65 --- /dev/null +++ b/projects/austria/docker-compose.yml @@ -0,0 +1,112 @@ +version: '3' +networks: + default: + driver: bridge +services: + libpostal: + image: pelias/libpostal-service + container_name: pelias_libpostal + user: "${DOCKER_USER}" + restart: always + ports: [ "4400:4400" ] + schema: + image: pelias/schema:master + container_name: pelias_schema + user: "${DOCKER_USER}" + volumes: + - "./pelias.json:/code/pelias.json" + api: + image: pelias/api:master + container_name: pelias_api + user: "${DOCKER_USER}" + restart: always + environment: [ "PORT=4000" ] + ports: [ "4000:4000" ] + volumes: + - "./pelias.json:/code/pelias.json" + placeholder: + image: pelias/placeholder:master + container_name: pelias_placeholder + user: "${DOCKER_USER}" + restart: always + environment: [ "PORT=4100" ] + ports: [ "4100:4100" ] + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + - "./blacklist/:/data/blacklist" + whosonfirst: + image: pelias/whosonfirst:master + container_name: pelias_whosonfirst + user: "${DOCKER_USER}" + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + openstreetmap: + image: pelias/openstreetmap:master + container_name: pelias_openstreetmap + user: "${DOCKER_USER}" + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + openaddresses: + image: pelias/openaddresses:master + container_name: pelias_openaddresses + user: "${DOCKER_USER}" + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + csv-importer: + image: pelias/csv-importer:master + container_name: pelias_csv_importer + user: "${DOCKER_USER}" + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + - "./blacklist/:/data/blacklist" + polylines: + image: pelias/polylines:master + container_name: pelias_polylines + user: "${DOCKER_USER}" + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + interpolation: + image: pelias/interpolation:master + container_name: pelias_interpolation + user: "${DOCKER_USER}" + restart: always + environment: [ "PORT=4300" ] + ports: [ "4300:4300" ] + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + pip: + image: pelias/pip-service:master + container_name: pelias_pip-service + user: "${DOCKER_USER}" + restart: always + environment: [ "PORT=4200" ] + ports: [ "4200:4200" ] + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + elasticsearch: + image: pelias/elasticsearch:7.5.1 + container_name: pelias_elasticsearch + user: "${DOCKER_USER}" + restart: always + ports: [ "9200:9200", "9300:9300" ] + volumes: + - "./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro" + - "${DATA_DIR}/elasticsearch:/usr/share/elasticsearch/data" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + cap_add: [ "IPC_LOCK" ] + security_opt: + - seccomp=unconfined diff --git a/projects/austria/elasticsearch.yml b/projects/austria/elasticsearch.yml new file mode 100644 index 00000000..ca137940 --- /dev/null +++ b/projects/austria/elasticsearch.yml @@ -0,0 +1,4 @@ +network.host: 0.0.0.0 +bootstrap.memory_lock: true +indices.breaker.fielddata.limit: 85% +indices.fielddata.cache.size: 75% \ No newline at end of file diff --git a/projects/austria/pelias.json b/projects/austria/pelias.json new file mode 100644 index 00000000..9dfb0a70 --- /dev/null +++ b/projects/austria/pelias.json @@ -0,0 +1,66 @@ +{ + "logger": { + "level": "debug", + "timestamp": false + }, + "esclient": { + "apiVersion": "7.5", + "hosts": [ + { "host": "elasticsearch" } + ] + }, + "elasticsearch": { + "settings": { + "index": { + "refresh_interval": "10s", + "number_of_replicas": "0", + "number_of_shards": "1" + } + } + }, + "api": { + "services": { + "pip": { "url": "http://pip:4200" }, + "libpostal": { "url": "http://libpostal:4400" }, + "placeholder": { "url": "http://placeholder:4100" }, + "interpolation": { "url": "http://interpolation:4300" } + }, + "defaultParameters": { + "focus.point.lat": 50.85, + "focus.point.lon": 4.35 + } + }, + "imports": { + "adminLookup": { + "enabled": true + }, + "geonames": { + "datapath": "/data/geonames", + "countryCode": "AT" + }, + "openstreetmap": { + "download": [ + { "sourceURL": "http://download.geofabrik.de/europe/austria-latest.osm.pbf" } + ], + "leveldbpath": "/tmp", + "datapath": "/data/openstreetmap", + "import": [{ + "filename": "austria-latest.osm.pbf" + }] + }, + "openaddresses": { + "datapath": "/data/openaddresses", + "files": ["at/31254.csv", "at/31255.csv", "at/31256.csv", "at/city_of_vienna.csv", "at/tirol.csv"] + }, + "polyline": { + "datapath": "/data/polylines", + "files": [ "extract.0sv" ] + }, + "whosonfirst": { + "datapath": "/data/whosonfirst", + "countryCode": "AT", + "importPostalcodes": true, + "importPlace": [ "85632997" ] + } + } +} diff --git a/projects/portland-metro/.env b/projects/portland-metro/.env index 7985c1a0..bf30c82c 100644 --- a/projects/portland-metro/.env +++ b/projects/portland-metro/.env @@ -1,3 +1,3 @@ COMPOSE_PROJECT_NAME=pelias -DATA_DIR=/tmp/pelias/portland-metro -DOCKER_USER=1000 +DATA_DIR=./data +DOCKER_USER=0 From 80767ff813de747838a920ba437d9e869a981d46 Mon Sep 17 00:00:00 2001 From: James Levell Date: Tue, 6 Oct 2020 14:35:02 +0200 Subject: [PATCH 2/6] added test url --- projects/austria/README.md | 2 +- projects/austria/pelias.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/austria/README.md b/projects/austria/README.md index 7c381de5..672c1952 100644 --- a/projects/austria/README.md +++ b/projects/austria/README.md @@ -29,4 +29,4 @@ pelias compose up You can now make queries against your new Pelias build: - + diff --git a/projects/austria/pelias.json b/projects/austria/pelias.json index 9dfb0a70..ab2e5d50 100644 --- a/projects/austria/pelias.json +++ b/projects/austria/pelias.json @@ -60,7 +60,7 @@ "datapath": "/data/whosonfirst", "countryCode": "AT", "importPostalcodes": true, - "importPlace": [ "85632997" ] + "importPlace": [ "85632785" ] } } } From 7f2be819bb61816355a59b32e8eb44bd4a75faa2 Mon Sep 17 00:00:00 2001 From: James Levell Date: Tue, 13 Oct 2020 09:57:07 +0200 Subject: [PATCH 3/6] fix(readme): fixed typo in readme --- projects/austria/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/austria/README.md b/projects/austria/README.md index 672c1952..180cedef 100644 --- a/projects/austria/README.md +++ b/projects/austria/README.md @@ -1,6 +1,6 @@ -# Belgium area +# Austrian area -This project is configured to download/prepare/build a complete Pelias installation for Belgium. +This project is configured to download/prepare/build a complete Pelias installation for Austria. # Setup From c0e3c8056a80f448c5ea6f73f4bcb974326d1473 Mon Sep 17 00:00:00 2001 From: jimmylevell Date: Fri, 16 Oct 2020 12:54:20 +0200 Subject: [PATCH 4/6] Update .env --- projects/portland-metro/.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/portland-metro/.env b/projects/portland-metro/.env index 4fab9498..7985c1a0 100644 --- a/projects/portland-metro/.env +++ b/projects/portland-metro/.env @@ -1,3 +1,3 @@ COMPOSE_PROJECT_NAME=pelias -DATA_DIR=/tmp/pelias/austria -DOCKER_USER=1000 \ No newline at end of file +DATA_DIR=/tmp/pelias/portland-metro +DOCKER_USER=1000 From be95e4eb255657ea7316735c89e720a124101ad5 Mon Sep 17 00:00:00 2001 From: jimmylevell Date: Fri, 16 Oct 2020 12:55:24 +0200 Subject: [PATCH 5/6] Update .env --- projects/austria/.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/austria/.env b/projects/austria/.env index bf30c82c..509ec9a2 100644 --- a/projects/austria/.env +++ b/projects/austria/.env @@ -1,3 +1,3 @@ COMPOSE_PROJECT_NAME=pelias -DATA_DIR=./data -DOCKER_USER=0 +DATA_DIR=/tmp/pelias/austria +DOCKER_USER=1000 From b16413b4d107798a946c24b03e158c029b4ae5d4 Mon Sep 17 00:00:00 2001 From: jimmylevell Date: Fri, 16 Oct 2020 15:09:40 +0200 Subject: [PATCH 6/6] Update .env --- projects/austria/.env | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/austria/.env b/projects/austria/.env index 509ec9a2..532d0361 100644 --- a/projects/austria/.env +++ b/projects/austria/.env @@ -1,3 +1,2 @@ COMPOSE_PROJECT_NAME=pelias DATA_DIR=/tmp/pelias/austria -DOCKER_USER=1000